summaryrefslogtreecommitdiff
path: root/tests/test_apt_cache.py
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-09-07 14:02:50 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2010-09-07 14:02:50 +0200
commit6b6da56c8b1eeee14c5a8a03b206e15fb66baec7 (patch)
tree8671bbd16ea272684b2887b712f7ed4b40f26069 /tests/test_apt_cache.py
parent6c5feb6111db81f4e7ec871275daa736a6fc793c (diff)
parent57c801f9472ac8572110f8958be1089fca6937f1 (diff)
downloadpython-apt-6b6da56c8b1eeee14c5a8a03b206e15fb66baec7.tar.gz
merged from lp:~mvo/python-apt/mvo
Diffstat (limited to 'tests/test_apt_cache.py')
-rw-r--r--tests/test_apt_cache.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/test_apt_cache.py b/tests/test_apt_cache.py
index 83d30ff3..e020b2e5 100644
--- a/tests/test_apt_cache.py
+++ b/tests/test_apt_cache.py
@@ -22,6 +22,10 @@ import shutil
class TestAptCache(unittest.TestCase):
""" test the apt cache """
+ def setUp(self):
+ # reset any config manipulations done in the individual tests
+ apt_pkg.init_config()
+
def testAptCache(self):
"""cache: iterate all packages and all dependencies """
cache = apt.Cache()
@@ -101,7 +105,8 @@ class TestAptCache(unittest.TestCase):
def test_apt_update(self):
rootdir = "./data/tmp"
- shutil.rmtree(rootdir)
+ if os.path.exists(rootdir):
+ shutil.rmtree(rootdir)
try:
os.makedirs(os.path.join(rootdir, "var/lib/apt/lists/partial"))
except OSError, e: