(self)
| 280 | self.assertEqual(zipapp.get_interpreter(str(target)), None) |
| 281 | |
| 282 | def test_modify_shebang(self): |
| 283 | # Test that we can change the shebang of a file. |
| 284 | source = self.tmpdir / 'source' |
| 285 | source.mkdir() |
| 286 | (source / '__main__.py').touch() |
| 287 | target = self.tmpdir / 'source.pyz' |
| 288 | zipapp.create_archive(str(source), str(target), interpreter='python') |
| 289 | new_target = self.tmpdir / 'changed.pyz' |
| 290 | zipapp.create_archive(str(target), str(new_target), interpreter='python2.7') |
| 291 | self.assertEqual(zipapp.get_interpreter(str(new_target)), 'python2.7') |
| 292 | |
| 293 | def test_write_shebang_to_fileobj(self): |
| 294 | # Test that we can change the shebang of a file, writing the result to a |
nothing calls this directly
no test coverage detected