(self)
| 30 | os.remove(self.tmpfilepath) |
| 31 | |
| 32 | def test_closed_file(self): |
| 33 | # Write & close |
| 34 | with open(self.tmpfilepath, "w") as f: |
| 35 | f.write(self.teststring) |
| 36 | with pytest.raises(pickle.PicklingError) as excinfo: |
| 37 | cloudpickle.dumps(f) |
| 38 | assert "Cannot pickle closed files" in str(excinfo.value) |
| 39 | os.remove(self.tmpfilepath) |
| 40 | |
| 41 | def test_r_mode(self): |
| 42 | # Write & close |
nothing calls this directly
no outgoing calls
no test coverage detected