(self)
| 303 | self.assertStartsWith(new_target.getvalue(), b'#!python2.7\n') |
| 304 | |
| 305 | def test_read_from_pathlike_obj(self): |
| 306 | # Test that we can copy an archive using a path-like object |
| 307 | # for the source. |
| 308 | source = self.tmpdir / 'source' |
| 309 | source.mkdir() |
| 310 | (source / '__main__.py').touch() |
| 311 | source = os_helper.FakePath(str(source)) |
| 312 | target1 = os_helper.FakePath(str(self.tmpdir / 'target1.pyz')) |
| 313 | target2 = os_helper.FakePath(str(self.tmpdir / 'target2.pyz')) |
| 314 | zipapp.create_archive(source, target1, interpreter='python') |
| 315 | zipapp.create_archive(target1, target2, interpreter='python2.7') |
| 316 | self.assertEqual(zipapp.get_interpreter(target2), 'python2.7') |
| 317 | |
| 318 | def test_read_from_fileobj(self): |
| 319 | # Test that we can copy an archive using an open file object. |
nothing calls this directly
no test coverage detected