summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2011-03-21 15:15:37 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2011-03-21 15:15:37 +0100
commitddf4cdd43c9b7d876376a99a4cddaf8e235472d1 (patch)
tree8debc122498868508e53f832b16e30f050b3f55c /tests
parent50cd25232b87fcf0be1a87bf2757f76a369ee175 (diff)
parente3ebbfe848d3d03baaf969374ac55641873bb798 (diff)
downloadpython-apt-ddf4cdd43c9b7d876376a99a4cddaf8e235472d1.tar.gz
* merged fix for parse_depends() in a multiarch environment
from debian/sid branch * apt/progress/text.py: - only run ioctl for termios.TIOCGWINSZ if the fd is a tty * apt/debfile.py, tests/test_debfile.py: - strip "./" from _get_content and add tests, this fixes a control file extraction bug in gdebi * python/depcache.cc: - when using the actiongroup as a contextmanager incref/decref on enter and leave. this should fix the instablity issues that aptdaemon runs into (LP: #691134) * debian/python3-apt.install: - fix py3 extension module install location (thanks to Barry) * python/depcache.cc: - provide bindings for new libapt SetCandidateRelease() * debian/control: - require new libapt-pkg-dev SetCandidateRelease() * py3 compatible exception handline * debian/control: - bump minimal python version to >= 2.6 * python/apt_pkgmodule.cc: - strip multiarch by default in RealParseDepends - add optional parameter to allow parse_depends() to keep the multiarch parameter * tests/test_deps.py: - add test forapt_pkg.parse_depends(strip_multiarch=True)
Diffstat (limited to 'tests')
-rw-r--r--tests/test_deps.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_deps.py b/tests/test_deps.py
index 674c9485..e9a75ee2 100644
--- a/tests/test_deps.py
+++ b/tests/test_deps.py
@@ -61,6 +61,14 @@ class TestDependencies(unittest.TestCase):
self.assertFalse(apt_pkg.check_dep("1", ">>", "1"))
self.assertTrue(apt_pkg.check_dep("2", ">>", "1"))
+ def test_parse_depends_multiarch(self):
+ # strip multiarch
+ deps = apt_pkg.parse_depends("po4a:native", True)
+ self.assertEqual(deps[0][0][0], "po4a")
+ # do not strip multiarch
+ deps = apt_pkg.parse_depends("po4a:native", False)
+ self.assertEqual(deps[0][0][0], "po4a:native")
+
def test_parse_depends(self):
"""dependencies: Test apt_pkg.parse_depends()"""
deps = apt_pkg.parse_depends("p1a (<< 1a) | p1b (>> 1b)")