Skip to content
Snippets Groups Projects
Commit 4e8b1343 authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

added `start_at` to `IDAllocator`

parent c1ee81cb
No related branches found
No related tags found
No related merge requests found
......@@ -29,8 +29,8 @@ class TestConcurrent(unittest.TestCase):
self.assertEqual(x, set(unique(x)))
id_alloc = IDAllocator(9000)
self.assertEqual(id_alloc.allocate_int(), 9000)
self.assertEqual(id_alloc.allocate_int(), 9001)
self.assertTrue(9000 <= id_alloc.allocate_int() <= 9009)
self.assertTrue(9000 <= id_alloc.allocate_int() <= 9009)
def test_atomic_number_timeout(self):
"""Test comparison while the lock is held all the time"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment