(self)
| 662 | |
| 663 | @without_source_date_epoch # timestamp invalidation test |
| 664 | def test_force(self): |
| 665 | self.assertRunOK('-q', self.pkgdir) |
| 666 | pycpath = importlib.util.cache_from_source(self.barfn) |
| 667 | # set atime/mtime backward to avoid file timestamp resolution issues |
| 668 | os.utime(pycpath, (time.time()-60,)*2) |
| 669 | mtime = os.stat(pycpath).st_mtime |
| 670 | # without force, no recompilation |
| 671 | self.assertRunOK('-q', self.pkgdir) |
| 672 | mtime2 = os.stat(pycpath).st_mtime |
| 673 | self.assertEqual(mtime, mtime2) |
| 674 | # now force it. |
| 675 | self.assertRunOK('-q', '-f', self.pkgdir) |
| 676 | mtime2 = os.stat(pycpath).st_mtime |
| 677 | self.assertNotEqual(mtime, mtime2) |
| 678 | |
| 679 | def test_recursion_control(self): |
| 680 | subpackage = os.path.join(self.pkgdir, 'spam') |
nothing calls this directly
no test coverage detected