(self, result, names)
| 643 | create_file(self.fname, b"ABC") |
| 644 | |
| 645 | def check_timestamp_agreement(self, result, names): |
| 646 | # Make sure that the st_?time and st_?time_ns fields roughly agree |
| 647 | # (they should always agree up to around tens-of-microseconds) |
| 648 | for name in names: |
| 649 | with self.subTest(name=name): |
| 650 | floaty = int(getattr(result, name) * 100_000) |
| 651 | nanosecondy = getattr(result, name + "_ns") // 10_000 |
| 652 | self.assertAlmostEqual(floaty, nanosecondy, delta=2, msg=name) |
| 653 | |
| 654 | def check_stat_attributes(self, fname): |
| 655 | result = os.stat(fname) |
no test coverage detected