(self)
| 262 | self.assertStartsWith(target.getvalue(), b'#!python\n') |
| 263 | |
| 264 | def test_read_shebang(self): |
| 265 | # Test that we can read the shebang line correctly. |
| 266 | source = self.tmpdir / 'source' |
| 267 | source.mkdir() |
| 268 | (source / '__main__.py').touch() |
| 269 | target = self.tmpdir / 'source.pyz' |
| 270 | zipapp.create_archive(str(source), str(target), interpreter='python') |
| 271 | self.assertEqual(zipapp.get_interpreter(str(target)), 'python') |
| 272 | |
| 273 | def test_read_missing_shebang(self): |
| 274 | # Test that reading the shebang line of a file without one returns None. |
nothing calls this directly
no test coverage detected