diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2011-08-01 09:29:25 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2011-08-01 09:29:25 +0200 |
| commit | eec06677e01d9ba9d7edd95feb0cd858e7b8b6bc (patch) | |
| tree | 311d72500e3146002b9c5e2350a4886d3c2b4dc5 /tests | |
| parent | 73050c16039e2adc3cb09b522a0ef36de450737e (diff) | |
| parent | c8bd732d5cb8be16ae48f8a72a4ed8a266b4ce36 (diff) | |
| download | python-apt-eec06677e01d9ba9d7edd95feb0cd858e7b8b6bc.tar.gz | |
* merged from the debian/sid bzr branch
* Breaks: debsecan (<< 0.4.15) [not only << 0.4.14] (Closes: #629512)
* python/arfile.cc:
- use APT::Configuration::getCompressionTypes() instead of duplicating
the supported methods here
* tests/test_debfile.py:
- add test for raise on unknown data.tar.xxx
* tests/test_aptsources_ports.py, tests/test_aptsources.py:
- use tmpdir during the tests to fix test failure with apt from
experimental
* Upload to unstable
* Increase Breaks for update-notifier to 0.99.3debian9
* utils/get_debian_mirrors.py: Adjust for new Alioth SCM urls
* debian/control: Standards-Version 3.9.2
* Fix Lintian overrides
* Fix spelling errors reported by Lintian (sep[a->e]rated, overrid[d]en)
* po/urd.po: Remove, ur.po is the correct file
* debian/source/format: Add, set it to "3.0 (native)"
* Fix get_changelog in Python 3 (Closes: #626532)
* apt/package.py: fix a few typos [formated->formatted] (Closes: #597054)
* doc/source/tutorials/contributing.rst: minor improvements (Closes: #625225)
- one typo [2to => 2to3], one broken link [pep8.py link]
* Esperanto (Closes: #626430)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/data/test_debs/data-tar-broken.deb | bin | 0 -> 626 bytes | |||
| -rw-r--r-- | tests/test_aptsources.py | 3 | ||||
| -rw-r--r-- | tests/test_aptsources_ports.py | 4 | ||||
| -rw-r--r-- | tests/test_debfile.py | 6 |
4 files changed, 10 insertions, 3 deletions
diff --git a/tests/data/test_debs/data-tar-broken.deb b/tests/data/test_debs/data-tar-broken.deb Binary files differnew file mode 100644 index 00000000..4fd42e0f --- /dev/null +++ b/tests/data/test_debs/data-tar-broken.deb diff --git a/tests/test_aptsources.py b/tests/test_aptsources.py index 1597674e..193d3806 100644 --- a/tests/test_aptsources.py +++ b/tests/test_aptsources.py @@ -3,6 +3,7 @@ import unittest import os import copy +import tempfile import apt_pkg import aptsources.sourceslist @@ -17,7 +18,7 @@ class TestAptSources(unittest.TestCase): if apt_pkg.config["APT::Architecture"] not in ('i386', 'amd64'): apt_pkg.config.set("APT::Architecture", "i386") apt_pkg.config.set("Dir::Etc", os.getcwd()) - apt_pkg.config.set("Dir::Etc::sourceparts", "/xxx") + apt_pkg.config.set("Dir::Etc::sourceparts", tempfile.mkdtemp()) if os.path.exists("./build/data/templates"): self.templates = os.path.abspath("./build/data/templates") elif os.path.exists("../build/data/templates"): diff --git a/tests/test_aptsources_ports.py b/tests/test_aptsources_ports.py index 991b532a..67c21b9c 100644 --- a/tests/test_aptsources_ports.py +++ b/tests/test_aptsources_ports.py @@ -1,7 +1,7 @@ #!/usr/bin/env python import os import unittest - +import tempfile import apt_pkg import aptsources.sourceslist @@ -17,7 +17,7 @@ class TestAptSourcesPorts(unittest.TestCase): apt_pkg.config.set("APT::Architecture", "powerpc") apt_pkg.config.set("Dir::Etc", os.path.abspath("data/aptsources_ports")) - apt_pkg.config.set("Dir::Etc::sourceparts", "/xxx") + apt_pkg.config.set("Dir::Etc::sourceparts", tempfile.mkdtemp()) if os.path.exists("../build/data/templates"): self.templates = os.path.abspath("../build/data/templates") else: diff --git a/tests/test_debfile.py b/tests/test_debfile.py index 5f6d1aa2..86a51cb9 100644 --- a/tests/test_debfile.py +++ b/tests/test_debfile.py @@ -119,6 +119,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/"]) + def test_no_supported_data_tar(self): + # ensure that a unknown data.tar.xxx raises a exception + with self.assertRaises(SystemError): + deb = apt.debfile.DebPackage("./data/test_debs/data-tar-broken.deb") + + if __name__ == "__main__": #logging.basicConfig(level=logging.DEBUG) |
