Commits

Anonymous committed 583291b

Restore old chmod to allow erasing

  • Participants
  • Parent commits e753f4b
  • Branches pathlib

Comments (0)

Files changed (1)

File Lib/test/test_pathlib.py

         self.assertEqual(p.restat(), st)
         # Change file mode by flipping write bit
         p.chmod(st.st_mode ^ 0o222)
+        self.addCleanup(p.chmod, st.st_mode)
         # Cached value didn't change
         self.assertEqual(p.stat(), st)
         # restat() invalidates the cache