Skip to content

Commit

Permalink
Use py.test for running unittests
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Wurster committed Sep 23, 2015
1 parent 4701730 commit 45ece7e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -18,3 +18,5 @@ test/data/*.gpsdecode.json
.eggs
venv
venv2
.cache
.coverage
4 changes: 2 additions & 2 deletions .travis.yml
Expand Up @@ -28,8 +28,8 @@ before_install:
- pip install pip setuptools --upgrade

install:
- CC=g++-4.8 python setup.py install
- CC=g++-4.8 pip install .\[test\] --upgrade

script:
- python setup.py test
- py.test test ais --cov ais --cov-report term-missing
- if [[ $TRAVIS_PYTHON_VERSION == '3.4' ]]; then (cd src && CC=gcc-4.8 CXX=g++-4.8 make -f Makefile-custom test); fi
7 changes: 4 additions & 3 deletions setup.py
Expand Up @@ -5,7 +5,8 @@

from setuptools import setup, find_packages, Extension

VERSION = open('VERSION').readline().strip()
with open('VERSION') as f:
VERSION = f.readline().strip()

EXTRA_COMPILE_ARGS = []
if sys.platform in ('darwin', 'linux', 'linux2'):
Expand Down Expand Up @@ -65,7 +66,7 @@
'six'
],
extras_require={
'test': ['gpsd_format']
'test': ['pytest', 'pytest-cov']
},
classifiers=[
'License :: OSI Approved :: Apache Software License',
Expand Down Expand Up @@ -93,5 +94,5 @@
'libais_stats = ais.stats:main',
]
},
test_suite = "test"
test_suite="test"
)

0 comments on commit 45ece7e

Please sign in to comment.