summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Watson <cjwatson@canonical.com>2012-11-19 11:58:29 +0000
committerColin Watson <cjwatson@canonical.com>2012-11-19 11:58:29 +0000
commitb1c7cc0732f19431e8365e0dc3f812130dca0bdb (patch)
tree7f710243549e5b73ae95896cfe1c8a1ab2b3a138
parent021e44e4f49b555a86e7cd75f6ea2a3ae6eb6b66 (diff)
downloadpython-apt-b1c7cc0732f19431e8365e0dc3f812130dca0bdb.tar.gz
* tests/test_apt_cache.py, tests/test_lp659438.py, tests/test_progress.py:
- Clear out APT::Update::Post-Invoke and APT::Update::Post-Invoke-Success in tests that call cache.update to avoid pollution from the host system.
-rw-r--r--debian/changelog9
-rw-r--r--tests/test_apt_cache.py2
-rw-r--r--tests/test_lp659438.py2
-rw-r--r--tests/test_progress.py2
4 files changed, 15 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index ec17d70a..e503456f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+python-apt (0.8.8ubuntu4) UNRELEASED; urgency=low
+
+ * tests/test_apt_cache.py, tests/test_lp659438.py, tests/test_progress.py:
+ - Clear out APT::Update::Post-Invoke and
+ APT::Update::Post-Invoke-Success in tests that call cache.update to
+ avoid pollution from the host system.
+
+ -- Colin Watson <cjwatson@ubuntu.com> Mon, 19 Nov 2012 11:57:28 +0000
+
python-apt (0.8.8ubuntu3) raring; urgency=low
* tests/test_lp659438.py:
diff --git a/tests/test_apt_cache.py b/tests/test_apt_cache.py
index 7e2ead2d..3cf89c07 100644
--- a/tests/test_apt_cache.py
+++ b/tests/test_apt_cache.py
@@ -57,6 +57,8 @@ class TestAptCache(TestCase):
self._cnf = {}
for item in apt_pkg.config.keys():
self._cnf[item] = apt_pkg.config.find(item)
+ apt_pkg.config.clear("APT::Update::Post-Invoke")
+ apt_pkg.config.clear("APT::Update::Post-Invoke-Success")
def tearDown(self):
for item in self._cnf:
diff --git a/tests/test_lp659438.py b/tests/test_lp659438.py
index da8cfa8e..b9a837b4 100644
--- a/tests/test_lp659438.py
+++ b/tests/test_lp659438.py
@@ -39,6 +39,8 @@ class RegressionTestCase(unittest.TestCase):
def setUp(self):
apt_pkg.init_config()
+ apt_pkg.config.clear("APT::Update::Post-Invoke")
+ apt_pkg.config.clear("APT::Update::Post-Invoke-Success")
self.chroot_path = chroot_path = tempfile.mkdtemp()
# Create a damaged status file
self.cache = apt.cache.Cache(rootdir=chroot_path)
diff --git a/tests/test_progress.py b/tests/test_progress.py
index 3b6285d6..b7bba02f 100644
--- a/tests/test_progress.py
+++ b/tests/test_progress.py
@@ -37,6 +37,8 @@ class TestProgress(unittest.TestCase):
with open("fetch_sources.list","w") as fobj:
fobj.write(deb_line)
apt_pkg.config.set("Dir::Etc::sourcelist", "fetch_sources.list")
+ apt_pkg.config.clear("APT::Update::Post-Invoke")
+ apt_pkg.config.clear("APT::Update::Post-Invoke-Success")
def test_acquire_progress(self):
progress = TestAcquireProgress()