diff options
| author | Julian Andres Klode <jak@debian.org> | 2014-03-22 18:34:33 +0100 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2014-03-22 18:34:33 +0100 |
| commit | db910e38e65586c7ab7875edbe2b7f21e03d5450 (patch) | |
| tree | 3a2988aea71cd99cbd068728df4118180c14d10a | |
| parent | 774c68832202d8fa4ef1432d8c180e9a4794feba (diff) | |
| download | python-apt-db910e38e65586c7ab7875edbe2b7f21e03d5450.tar.gz | |
tests: Drop some more Python 2.6 cruft
We do not support Python 2.6 anymore, so we can get rid of this.
| -rw-r--r-- | tests/test_apt_cache.py | 8 | ||||
| -rw-r--r-- | tests/test_auth.py | 12 |
2 files changed, 1 insertions, 19 deletions
diff --git a/tests/test_apt_cache.py b/tests/test_apt_cache.py index ee4fc50b..4df5e27d 100644 --- a/tests/test_apt_cache.py +++ b/tests/test_apt_cache.py @@ -16,12 +16,6 @@ import sys import tempfile import unittest -if sys.version_info[0] == 2 and sys.version_info[1] == 6: - from unittest2 import TestCase - TestCase # pyflakes -else: - from unittest import TestCase - from test_all import get_library_dir libdir = get_library_dir() @@ -51,7 +45,7 @@ def get_open_file_descriptors(): return set(map(int, fds)) -class TestAptCache(TestCase): +class TestAptCache(unittest.TestCase): """ test the apt cache """ def setUp(self): diff --git a/tests/test_auth.py b/tests/test_auth.py index dafbdc31..790ed380 100644 --- a/tests/test_auth.py +++ b/tests/test_auth.py @@ -115,18 +115,6 @@ class TestAuthKeys(unittest.TestCase): """Test handling of keys for signed repositories.""" - if sys.version_info[0] == 2 and sys.version_info[1] < 7: - def addCleanup(self, function, *args, **kwds): - try: - self.cleanup.append(lambda: function(*args, **kwds)) - except AttributeError: - self.cleanup = [lambda: function(*args, **kwds)] - - def tearDown(self): - for f in self.cleanup: - f() - self.cleanup = [] - def setUp(self): # reset any config manipulations done in the individual tests apt_pkg.init_config() |
