fix limit tests
@@ -1048,6 +1048,7 @@ class TestMemoryAsyncPool(unittest.TestCase):
cupy.cuda.Device().synchronize()
def tearDown(self):
+ self.pool.set_limit(size=0)
self.pool.free_all_blocks()
def test_zero_size_alloc(self):
@@ -1253,7 +1254,7 @@ class TestMemoryAsyncPool(unittest.TestCase):
assert 2**33 == self.pool.get_limit()
self.pool.set_limit(size=0)
- assert 0 == self.pool.get_limit()
+ assert 2**64-1 == self.pool.get_limit()
with self.assertRaises(ValueError):
self.pool.set_limit(size=-1)
@@ -1262,7 +1263,7 @@ class TestMemoryAsyncPool(unittest.TestCase):
_, total = cupy.cuda.runtime.memGetInfo()
self.pool.set_limit(fraction=0)
- assert 0 == self.pool.get_limit()
+ assert 2**64-1 == self.pool.get_limit()
self.pool.set_limit(fraction=0.5)
assert total * 0.5 == self.pool.get_limit()
