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