This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients docs@python, serhiy.storchaka, sobolevn
Date 2021-09-07.10:36:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1631010968.45.0.567296376121.issue45125@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021-09-07 10:36:08serhiy.storchakasetrecipients: + serhiy.storchaka, docs@python, sobolevn
2021-09-07 10:36:08serhiy.storchakasetmessageid: <1631010968.45.0.567296376121.issue45125@roundup.psfhosted.org>
2021-09-07 10:36:08serhiy.storchakalinkissue45125 messages
2021-09-07 10:36:08serhiy.storchakacreate