diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/data/test_debs/data-tar-xz.deb | bin | 626 -> 680 bytes | |||
| -rw-r--r-- | tests/data/test_debs/data-tar.deb | bin | 0 -> 20672 bytes | |||
| -rw-r--r-- | tests/test_debfile.py | 6 | ||||
| -rw-r--r-- | tests/test_paths.py | 8 |
4 files changed, 10 insertions, 4 deletions
diff --git a/tests/data/test_debs/data-tar-xz.deb b/tests/data/test_debs/data-tar-xz.deb Binary files differindex fc15f597..9dd4d670 100644 --- a/tests/data/test_debs/data-tar-xz.deb +++ b/tests/data/test_debs/data-tar-xz.deb diff --git a/tests/data/test_debs/data-tar.deb b/tests/data/test_debs/data-tar.deb Binary files differnew file mode 100644 index 00000000..d8e4a988 --- /dev/null +++ b/tests/data/test_debs/data-tar.deb diff --git a/tests/test_debfile.py b/tests/test_debfile.py index ec3bf518..21255517 100644 --- a/tests/test_debfile.py +++ b/tests/test_debfile.py @@ -120,6 +120,12 @@ Description: testpackage for gdebi - contains usr/bin/binary for file reading deb = apt.debfile.DebPackage("./data/test_debs/data-tar-xz.deb") self.assertEqual(deb.filelist, ["./", "usr/", "usr/bin/"]) + @unittest.skipIf(apt_pkg.version_compare(apt_pkg.VERSION, "0.9.15.4~") < 0, + "APT too old for uncompressed control.tar/data.tar") + def test_uncompressed_data(self): + deb = apt.debfile.DebPackage("./data/test_debs/data-tar.deb") + self.assertEqual(deb.filelist, ["./", "usr/", "usr/bin/"]) + def test_check_exception(self): deb = apt.debfile.DebPackage("./data/test_debs/data-tar-xz.deb") self.assertRaises(AttributeError, lambda: deb.missing_deps) diff --git a/tests/test_paths.py b/tests/test_paths.py index 62ea1665..51d22f49 100644 --- a/tests/test_paths.py +++ b/tests/test_paths.py @@ -53,8 +53,8 @@ class TestPath(unittest.TestCase): self.assertTrue(archive[b"debian-binary"]) self.assertTrue(archive[u"debian-binary"]) - tar = archive.gettar(u"control.tar.gz", "gzip") - tar = archive.gettar(b"control.tar.gz", "gzip") + tar = archive.gettar(u"control.tar.xz", "xz") + tar = archive.gettar(b"control.tar.xz", "xz") tar.extractall(self.dir_unicode) tar.extractall(self.dir_bytes) @@ -63,8 +63,8 @@ class TestPath(unittest.TestCase): tar.extractdata(b"control") tar.extractdata(u"control") - apt_inst.TarFile(os.path.join(self.dir_unicode, u"control.tar.gz")) - apt_inst.TarFile(os.path.join(self.dir_bytes, b"control.tar.gz")) + apt_inst.TarFile(os.path.join(self.dir_unicode, u"control.tar.xz")) + apt_inst.TarFile(os.path.join(self.dir_bytes, b"control.tar.xz")) def test_configuration(self): with open(self.file_unicode, 'w') as config: |
