(self)
| 39 | os.remove(self.tmpfilepath) |
| 40 | |
| 41 | def test_r_mode(self): |
| 42 | # Write & close |
| 43 | with open(self.tmpfilepath, "w") as f: |
| 44 | f.write(self.teststring) |
| 45 | # Open for reading |
| 46 | with open(self.tmpfilepath) as f: |
| 47 | new_f = pickle.loads(cloudpickle.dumps(f)) |
| 48 | self.assertEqual(self.teststring, new_f.read()) |
| 49 | os.remove(self.tmpfilepath) |
| 50 | |
| 51 | def test_w_mode(self): |
| 52 | with open(self.tmpfilepath, "w") as f: |
nothing calls this directly
no outgoing calls
no test coverage detected