Serhiy Storchaka <[email protected]> added the comment:
Go ahead. Fix also other issues in tests:
* All pickling tests should test with all supported protocols, not just with
the default one.
* self.assertTrue(
isinstance(deserialized_sl, shared_memory.ShareableList)
)
assertIsinstance() can be used here.
* self.assertTrue(deserialized_sl[-1], 9)
What is this? If it tests that deserialized_sl[-1] is true, 9 should be
removed. Should it be assertEqual() instead?
* self.assertFalse(sl is deserialized_sl)
assertIs() can be used here.
* self.assertTrue(len(serialized_sl) == len(serialized_larger_sl))
assertEqual() can be used here.
* All close() should either be called in the finally block, or registered with
addCleanup(). Otherwise we will heave resource leaks if tests fail.
There may be other issues in other tests. Seems these tests need a clean up.
----------
nosy: +serhiy.storchaka
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue45125>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com