(self, path)
| 1440 | self.assertIn(name + 'c', namelist) |
| 1441 | |
| 1442 | def requiresWriteAccess(self, path): |
| 1443 | # effective_ids unavailable on windows |
| 1444 | if not os.access(path, os.W_OK, |
| 1445 | effective_ids=os.access in os.supports_effective_ids): |
| 1446 | self.skipTest('requires write access to the installed location') |
| 1447 | filename = os.path.join(path, 'test_zipfile.try') |
| 1448 | try: |
| 1449 | fd = os.open(filename, os.O_WRONLY | os.O_CREAT) |
| 1450 | os.close(fd) |
| 1451 | except Exception: |
| 1452 | self.skipTest('requires write access to the installed location') |
| 1453 | unlink(filename) |
| 1454 | |
| 1455 | def test_write_pyfile(self): |
| 1456 | self.requiresWriteAccess(os.path.dirname(__file__)) |
no test coverage detected