(self)
| 116 | self.assertEqual(self.pathmodule.getsize(filename), 12) |
| 117 | |
| 118 | def test_filetime(self): |
| 119 | filename = os_helper.TESTFN |
| 120 | self.addCleanup(os_helper.unlink, filename) |
| 121 | |
| 122 | create_file(filename, b'foo') |
| 123 | |
| 124 | with open(filename, "ab", 0) as f: |
| 125 | f.write(b"bar") |
| 126 | |
| 127 | with open(filename, "rb", 0) as f: |
| 128 | data = f.read() |
| 129 | self.assertEqual(data, b"foobar") |
| 130 | |
| 131 | self.assertLessEqual( |
| 132 | self.pathmodule.getctime(filename), |
| 133 | self.pathmodule.getmtime(filename) |
| 134 | ) |
| 135 | |
| 136 | def test_exists(self): |
| 137 | filename = os_helper.TESTFN |
nothing calls this directly
no test coverage detected