diff --git a/.travis.yml b/.travis.yml index ddb7e264..6ef74085 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,9 +2,9 @@ language: python sudo: required python: - "2.7" - - "3.4" - "3.5" - "3.6" + - "3.7" env: global: - PATH=/home/travis/miniconda/bin:$PATH @@ -26,7 +26,7 @@ install: # Useful for debugging any issues with conda - conda info -a - - conda create -n testenv --yes python=$TRAVIS_PYTHON_VERSION numpy scipy libgfortran matplotlib nose pillow + - conda create -n testenv --yes python=$TRAVIS_PYTHON_VERSION numpy scipy libgfortran-ng matplotlib nose pillow - source activate testenv - pip install -r ci/requirements.txt - pip install -r ci/requirements-test.txt diff --git a/ci/requirements-3.7.txt b/ci/requirements-3.7.txt new file mode 100644 index 00000000..9edef4fb --- /dev/null +++ b/ci/requirements-3.7.txt @@ -0,0 +1,2 @@ +# Additional requirements for Python 3.5 +pyyaml # this is already in requirements.txt, but pip doesn't allow empty requirements files diff --git a/test/system/test_ircr.py b/test/system/test_ircr.py index d159668c..d64d2a88 100644 --- a/test/system/test_ircr.py +++ b/test/system/test_ircr.py @@ -22,6 +22,7 @@ assert_config, assert_label_equal, assert_records, assert_return_code, edit_parameters, expected_short_list, substitute_labels) from functools import partial +import re repository = "https://bitbucket.org/apdavison/ircr2013" #repository = "/Volumes/USERS/andrew/dev/ircr2013" # during development @@ -48,7 +49,7 @@ def wrapped(): assert_in_output, "updating to branch default"), ("Run the computation without Sumatra", "python glass_sem_analysis.py default_parameters MV_HFV_012.jpg", - assert_in_output, "2416.86315789 60.0", + assert_in_output, re.compile(r"2416\.863[0-9]* 60\.0"), assert_file_exists, os.path.join("Data", datetime.now().strftime("%Y%m%d")), # Data subdirectory contains another subdirectory labelled with today's date) ), # assert(subdirectory contains three image files). ("Set up a Sumatra project", @@ -56,7 +57,7 @@ def wrapped(): assert_in_output, "Sumatra project successfully set up"), ("Run the ``glass_sem_analysis.py`` script with Sumatra", "smt run -e python -m glass_sem_analysis.py -r 'initial run' default_parameters MV_HFV_012.jpg", - assert_in_output, ("2416.86315789 60.0", "histogram.png")), + assert_in_output, (re.compile(r"2416\.863[0-9]* 60\.0"), "histogram.png")), ("Comment on the outcome", "smt comment 'works fine'"), ("Set defaults", diff --git a/test/system/utils.py b/test/system/utils.py index 70294e39..85365a71 100644 --- a/test/system/utils.py +++ b/test/system/utils.py @@ -23,7 +23,7 @@ label_pattern = re.compile("Record label for this run: '(?P