Skip to content
Prev Previous commit
Next Next commit
2.6 compat for TestCase.assertIsNone
  • Loading branch information
Joe Jevnik committed May 25, 2017
commit 9e11439ba59dd9c7013096537176229ddd488abc
9 changes: 6 additions & 3 deletions tests/cloudpickle_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,15 @@ def f():
"""a function with no closure cells
"""

self.assertIsNone(f.__closure__, msg='f actually has closure cells!')
self.assertTrue(
f.__closure__ is None,
msg='f actually has closure cells!',
)

g = pickle_depickle(f)

self.assertIsNone(
g.__closure__,
self.assertTrue(
g.__closure__ is None,
msg='g now has closure cells even though f does not',
)

Expand Down