(self)
| 329 | self.assertStartsWith(new_target.getvalue(), b'#!python2.7\n') |
| 330 | |
| 331 | def test_remove_shebang(self): |
| 332 | # Test that we can remove the shebang from a file. |
| 333 | source = self.tmpdir / 'source' |
| 334 | source.mkdir() |
| 335 | (source / '__main__.py').touch() |
| 336 | target = self.tmpdir / 'source.pyz' |
| 337 | zipapp.create_archive(str(source), str(target), interpreter='python') |
| 338 | new_target = self.tmpdir / 'changed.pyz' |
| 339 | zipapp.create_archive(str(target), str(new_target), interpreter=None) |
| 340 | self.assertEqual(zipapp.get_interpreter(str(new_target)), None) |
| 341 | |
| 342 | def test_content_of_copied_archive(self): |
| 343 | # Test that copying an archive doesn't corrupt it. |
nothing calls this directly
no test coverage detected