diff options
| -rw-r--r-- | debian/changelog | 3 | ||||
| -rw-r--r-- | tests/test_aptsources.py | 3 | ||||
| -rw-r--r-- | tests/test_aptsources_ports.py | 4 |
3 files changed, 7 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog index a25167d5..193f4c58 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,9 @@ python-apt (0.8.1) UNRELEASED; urgency=low 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 -- Julian Andres Klode <jak@debian.org> Tue, 07 Jun 2011 14:00:22 +0200 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: |
