summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander.sulfrian@fu-berlin.de>2017-03-22 20:20:40 +0100
committerAlexander Sulfrian <alexander.sulfrian@fu-berlin.de>2017-03-29 13:29:58 +0200
commit73045f451a8cdfb0c48e87e736c3b6a28b22f6fb (patch)
tree403d526f48a6ed7bf914db2393dc77cf8dde6506
parentd5f24fed13339d01424c4f7748c239ae33e0b606 (diff)
downloadbcfg2-73045f451a8cdfb0c48e87e736c3b6a28b22f6fb.tar.gz
bcfg2-73045f451a8cdfb0c48e87e736c3b6a28b22f6fb.tar.bz2
bcfg2-73045f451a8cdfb0c48e87e736c3b6a28b22f6fb.zip
testsuite: Server requires Python2.6
We do not want to run the test for the Server with Python2.4 and Python2.5 and use the nose-exclude plugin to disable the Server tests based on the directory. We do not even want to import the modules of the Server, as it might not be possible anymore (missing dependencies or invalid syntax). nose-exclude-0.2 breaks compatibility with Python2.5 and below (it is using the "with open(..):" syntax), so we have to stick to the last version below.
-rw-r--r--.travis.yml4
-rw-r--r--testsuite/Testsrc/test_code_checks.py5
-rw-r--r--testsuite/requirements-legacy.txt1
3 files changed, 6 insertions, 4 deletions
diff --git a/.travis.yml b/.travis.yml
index 6a061b233..33cd0f022 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,8 +2,8 @@ sudo: false
language: python
matrix:
include:
- - env: PYTHON=2.4
- - env: PYTHON=2.5
+ - env: PYTHON=2.4 NOSE_EXCLUDE_DIRS=testsuite/Testsrc/Testlib/TestServer
+ - env: PYTHON=2.5 NOSE_EXCLUDE_DIRS=testsuite/Testsrc/Testlib/TestServer
- python: "2.6"
- python: "2.7"
- python: "2.7_with_system_site_packages"
diff --git a/testsuite/Testsrc/test_code_checks.py b/testsuite/Testsrc/test_code_checks.py
index c26d8c139..44c4633a7 100644
--- a/testsuite/Testsrc/test_code_checks.py
+++ b/testsuite/Testsrc/test_code_checks.py
@@ -79,9 +79,10 @@ no_checks = {
"lib/Bcfg2/Server/migrations": ["*.py"],
"lib/Bcfg2/Server/south_migrations": ["*.py"],
}
+
if sys.version_info < (2, 6):
- # multiprocessing core requires py2.6
- no_checks['lib/Bcfg2/Server'] = ['MultiprocessingCore.py']
+ # Server requires python 2.6
+ no_checks['lib/Bcfg2'] = ['Server']
try:
any
diff --git a/testsuite/requirements-legacy.txt b/testsuite/requirements-legacy.txt
index 87af9cfc6..7d918cb45 100644
--- a/testsuite/requirements-legacy.txt
+++ b/testsuite/requirements-legacy.txt
@@ -5,6 +5,7 @@ argparse
ssl
nose
+nose-exclude<0.2
mock<1.1
unittest2<0.6
logilab-common==0.53.0