use correct py.test for python version

This commit is contained in:
Luke Campagnola 2014-03-24 22:31:56 -04:00
parent 5d2441a29b
commit 4484efaefe
2 changed files with 9 additions and 5 deletions

View File

@ -91,7 +91,8 @@ before_script:
# Make sure everyone uses the correct python # Make sure everyone uses the correct python
- mkdir ~/bin && ln -s `which python${PYTHON}` ~/bin - mkdir ~/bin && ln -s `which python${PYTHON}` ~/bin
- export PATH=~/bin:$PATH - export PATH=~/bin:$PATH
- which python
- python --version
script: script:
# Run unit tests # Run unit tests
@ -112,9 +113,9 @@ script:
fi; fi;
# Check install works # Check install works
- CWD=`pwd` - python setup.py install
- python setup.py install && cd .. && echo "import pyqtgraph.examples" | python - cd ..; echo "import pyqtgraph.examples" | python
# Check double-install fails # 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;

View File

@ -32,7 +32,10 @@ def checkStyle():
def unitTests(): def unitTests():
try: 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 ret = 0
except Exception as e: except Exception as e:
out = e.output out = e.output