Update tox.ini to actually run tests and make Travis use it.
Remove py.test runner from setup.py.
This commit is contained in:
@@ -3,8 +3,8 @@ language: python
|
||||
sudo: false
|
||||
|
||||
env:
|
||||
- TOX_ENV=py27
|
||||
- TOX_ENV=py34
|
||||
- TOXENV=py27
|
||||
- TOXENV=py34
|
||||
|
||||
addons:
|
||||
apt:
|
||||
@@ -14,5 +14,8 @@ addons:
|
||||
services:
|
||||
- mongodb
|
||||
|
||||
install:
|
||||
- pip install -U tox
|
||||
|
||||
script:
|
||||
- ./setup.py test
|
||||
- tox
|
||||
|
17
setup.py
17
setup.py
@@ -6,21 +6,6 @@ import sys
|
||||
from setuptools import setup
|
||||
from setuptools.command.test import test as TestCommand
|
||||
|
||||
|
||||
class PyTest(TestCommand):
|
||||
|
||||
def finalize_options(self):
|
||||
TestCommand.finalize_options(self)
|
||||
self.test_args = []
|
||||
self.test_suite = True
|
||||
|
||||
def run_tests(self):
|
||||
#import here, cause outside the eggs aren't loaded
|
||||
import pytest
|
||||
errno = pytest.main(self.test_args)
|
||||
sys.exit(errno)
|
||||
|
||||
|
||||
install_requires = [
|
||||
# core dependencies
|
||||
'decorator',
|
||||
@@ -85,6 +70,4 @@ setup(
|
||||
},
|
||||
install_requires=install_requires,
|
||||
zip_safe=False,
|
||||
test_suite='tests',
|
||||
cmdclass={'test': PyTest},
|
||||
)
|
||||
|
Reference in New Issue
Block a user