summaryrefslogtreecommitdiff
path: root/tests/test_all.py
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2014-01-06 12:36:29 +0100
committerJulian Andres Klode <jak@debian.org>2014-01-06 12:36:29 +0100
commitf6c94dbe9cbfa645b19832842183e248f940f829 (patch)
tree271239a095a573a8fbef75fec274f6d1f965ffea /tests/test_all.py
parentaf7a03182edaf58a18e1821d172c0f0dd869c898 (diff)
downloadpython-apt-f6c94dbe9cbfa645b19832842183e248f940f829.tar.gz
tests: Remove checks for Python older than 2.7
This simplifies the test code a tiny bit.
Diffstat (limited to 'tests/test_all.py')
-rw-r--r--tests/test_all.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/tests/test_all.py b/tests/test_all.py
index 180712f9..6eebb0cf 100644
--- a/tests/test_all.py
+++ b/tests/test_all.py
@@ -10,8 +10,7 @@ import unittest.runner
import unittest
import sys
-# workaround for py3.2 that apparently does not have this anymore
-# it has "abiflags"
+# Python 3 only provides abiflags since 3.2
if not hasattr(sys, "pydebug"):
if sys.abiflags.startswith("d"):
sys.pydebug = True
@@ -27,12 +26,8 @@ def get_library_dir():
from distutils.sysconfig import get_python_version
# Set the path to the build directory.
plat_specifier = ".%s-%s" % (get_platform(), get_python_version())
- if sys.version_info[0] >= 3 or sys.version_info[1] >= 6:
- library_dir = "../build/lib%s%s" % (plat_specifier,
- (sys.pydebug and "-pydebug" or ""))
- else:
- library_dir = "../build/lib%s%s" % ((sys.pydebug and "_d" or ""),
- plat_specifier)
+ library_dir = "../build/lib%s%s" % (plat_specifier,
+ (sys.pydebug and "-pydebug" or ""))
return os.path.abspath(library_dir)