From b1c7cc0732f19431e8365e0dc3f812130dca0bdb Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Mon, 19 Nov 2012 11:58:29 +0000 Subject: * 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. --- debian/changelog | 9 +++++++++ tests/test_apt_cache.py | 2 ++ tests/test_lp659438.py | 2 ++ tests/test_progress.py | 2 ++ 4 files changed, 15 insertions(+) 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 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() -- cgit v1.2.3