summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2013-10-10 14:54:41 +0200
committerJulian Andres Klode <jak@debian.org>2013-10-10 14:54:41 +0200
commit571618374ee880d00477d7379aaf01a36718db64 (patch)
treeac3d6a01f302241e532a2248b486f0e0a115bc88 /tests
parent03b1e193ecf6ef09f38982ab752ee6998cf626d8 (diff)
downloadpython-apt-571618374ee880d00477d7379aaf01a36718db64.tar.gz
tests: Do not set dir::etc::sourceparts to /tmp
This can cause build failures if *.list files are present in /tmp. Use /dev/null instead (not a directory, but APT silently ignores this).
Diffstat (limited to 'tests')
-rw-r--r--tests/test_apt_cache.py3
-rw-r--r--tests/test_progress.py3
2 files changed, 4 insertions, 2 deletions
diff --git a/tests/test_apt_cache.py b/tests/test_apt_cache.py
index 21dfeb98..9940374f 100644
--- a/tests/test_apt_cache.py
+++ b/tests/test_apt_cache.py
@@ -188,7 +188,8 @@ class TestAptCache(TestCase):
old_source_list = apt_pkg.config.find("dir::etc::sourcelist")
old_source_parts = apt_pkg.config.find("dir::etc::sourceparts")
apt_pkg.config.set("dir::etc::sourcelist", base_sources)
- apt_pkg.config.set("dir::etc::sourceparts", "/tmp")
+ # TODO: /dev/null is not a dir, perhaps find something better
+ apt_pkg.config.set("dir::etc::sourceparts", "/dev/null")
# main sources.list
sources_list = base_sources
with open(sources_list, "w") as f:
diff --git a/tests/test_progress.py b/tests/test_progress.py
index b7bba02f..e4a5fa3c 100644
--- a/tests/test_progress.py
+++ b/tests/test_progress.py
@@ -27,7 +27,8 @@ class TestProgress(unittest.TestCase):
apt_pkg.init()
apt_pkg.config.set("APT::Architecture", "amd64")
apt_pkg.config.set("Dir::Etc", basedir)
- apt_pkg.config.set("Dir::Etc::sourceparts", "/tmp")
+ # TODO: /dev/null is not a dir, perhaps find something better
+ apt_pkg.config.set("Dir::Etc::sourceparts", "/dev/null")
# setup lists dir
if not os.path.exists("./tmp/partial"):
os.makedirs("./tmp/partial")