We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 26c319c commit 020be10Copy full SHA for 020be10
tests/cloudpickle_test.py
@@ -38,7 +38,7 @@
38
from io import BytesIO
39
40
import cloudpickle
41
-from cloudpickle.cloudpickle import _find_module
+from cloudpickle.cloudpickle import _find_module, _make_empty_cell, cell_set
42
43
from .testutils import subprocess_pickle_echo
44
@@ -494,6 +494,19 @@ def example():
494
"'))()")
495
assert not subprocess.call([sys.executable, '-c', command])
496
497
+ def test_cell_manipulation(self):
498
+ cell = _make_empty_cell()
499
+
500
+ with pytest.raises(ValueError):
501
+ cell.cell_contents
502
503
+ ob = object()
504
+ cell_set(cell, ob)
505
+ self.assertEqual(
506
+ cell.cell_contents is ob,
507
+ msg='cell contents not set correctly',
508
+ )
509
510
511
if __name__ == '__main__':
512
unittest.main()
0 commit comments