MCPcopy Index your code
hub / github.com/cloudpipe/cloudpickle / test_empty_file

Method test_empty_file

tests/cloudpickle_file_test.py:25–30  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

23 shutil.rmtree(self.tmpdir)
24
25 def test_empty_file(self):
26 # Empty file
27 open(self.tmpfilepath, "w").close()
28 with open(self.tmpfilepath) as f:
29 self.assertEqual("", pickle.loads(cloudpickle.dumps(f)).read())
30 os.remove(self.tmpfilepath)
31
32 def test_closed_file(self):
33 # Write & close

Callers

nothing calls this directly

Calls 1

closeMethod · 0.80

Tested by

no test coverage detected