From 4484efaefe0c99516940812d0472e82998e801f6 Mon Sep 17 00:00:00 2001 From: Luke Campagnola Date: Mon, 24 Mar 2014 22:31:56 -0400 Subject: [PATCH] use correct py.test for python version --- .travis.yml | 9 +++++---- tools/setupHelpers.py | 5 ++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index bd7ead6d..9ee3c585 100644 --- a/.travis.yml +++ b/.travis.yml @@ -91,7 +91,8 @@ before_script: # Make sure everyone uses the correct python - mkdir ~/bin && ln -s `which python${PYTHON}` ~/bin - export PATH=~/bin:$PATH - + - which python + - python --version script: # Run unit tests @@ -112,9 +113,9 @@ script: fi; # Check install works - - CWD=`pwd` - - python setup.py install && cd .. && echo "import pyqtgraph.examples" | python + - python setup.py install + - cd ..; echo "import pyqtgraph.examples" | python # Check double-install fails - - cd pyqtgraph && python setup.py install && if [ $? == 0 ]; then false; fi; + - cd pyqtgraph && python setup.py install && if [ $? == 0 ]; then false; else true; fi; diff --git a/tools/setupHelpers.py b/tools/setupHelpers.py index 150e8186..8e2e2ab5 100644 --- a/tools/setupHelpers.py +++ b/tools/setupHelpers.py @@ -32,7 +32,10 @@ def checkStyle(): def unitTests(): try: - out = check_output('PYTHONPATH=. py.test', shell=True) + if sys.version[0] == 3: + out = check_output('PYTHONPATH=. py.test-3', shell=True) + else: + out = check_output('PYTHONPATH=. py.test', shell=True) ret = 0 except Exception as e: out = e.output