From 00129e7bbc2bd8fa60aebb86ea3a6386c2b2fc3a Mon Sep 17 00:00:00 2001 From: Moshe Zada Date: Mon, 25 Feb 2019 14:19:19 +0200 Subject: [PATCH] Add python2.7 failing test --- .travis.yml | 14 +++----------- git/test/test_fail.py | 8 ++++++++ test-requirements.txt | 3 ++- 3 files changed, 13 insertions(+), 12 deletions(-) create mode 100644 git/test/test_fail.py diff --git a/.travis.yml b/.travis.yml index adb693dd2..25e2cfe30 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,16 +5,6 @@ python: - "3.5" - "3.6" # - "pypy" - won't work as smmap doesn't work (see gitdb/.travis.yml for details) -matrix: - include: - - python: 3.7 - dist: xenial - sudo: required - - python: "nightly" - dist: xenial - sudo: required - allow_failures: - - python: "nightly" git: # a higher depth is needed for most of the tests - must be high enough to not actually be shallow # as we clone our own repository in the process @@ -39,9 +29,11 @@ script: # Make sure we limit open handles to see if we are leaking them - ulimit -n 128 - ulimit -n - - nosetests -v --with-coverage + - nosetests -v --with-coverage --with-xunit - if [ "$TRAVIS_PYTHON_VERSION" == '3.4' ]; then flake8 --ignore=W293,E265,E266,W503,W504,E731; fi - if [ "$TRAVIS_PYTHON_VERSION" == '3.5' ]; then cd doc && make html; fi - +after_script: + - tomato nosetests.xml after_success: - codecov diff --git a/git/test/test_fail.py b/git/test/test_fail.py new file mode 100644 index 000000000..11eaf057c --- /dev/null +++ b/git/test/test_fail.py @@ -0,0 +1,8 @@ +import sys + + +def test_add3(): + assert 1 + 1 == 2 + + # fail in python 2 only + assert sys.version_info.major == 3 diff --git a/test-requirements.txt b/test-requirements.txt index 1cea3aa21..12442f380 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -3,4 +3,5 @@ coverage flake8 nose -mock; python_version=='2.7' \ No newline at end of file +git+https://github.com/moshe/pytest-tomato.git@debug#subdirectory=tomato-lib +mock; python_version=='2.7'