diff --git a/.travis.yml b/.travis.yml index 6cf18105f..d0a1b1c59 100644 --- a/.travis.yml +++ b/.travis.yml @@ -50,7 +50,7 @@ install: script: - if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then flake8 stripe tests; fi - - python -W all -bb -W error::BytesWarning -m coverage.__main__ run setup.py test + - python -W all -bb -W error::BytesWarning setup.py test --addopts "--cov=stripe" after_success: coveralls diff --git a/README.md b/README.md index ff2cc9ef6..7b99a61e8 100644 --- a/README.md +++ b/README.md @@ -148,13 +148,17 @@ instructions for installing via Homebrew and other methods): tox -e py27 +Run all tests in a single file: + + tox -e py27 -- tests/api_resources/abstract/test_updateable_api_resource.py + Run a single test suite: - tox -e py27 -- --test-suite stripe.test.resources.test_updateable.UpdateableAPIResourceTests + tox -e py27 -- tests/api_resources/abstract/test_updateable_api_resource.py::TestUpdateableAPIResource Run a single test: - tox -e py27 -- --test-suite stripe.test.resources.test_updateable.UpdateableAPIResourceTests.test_save + tox -e py27 -- tests/api_resources/abstract/test_updateable_api_resource.py::TestUpdateableAPIResource::test_save Run the linter with: diff --git a/setup.py b/setup.py index f523b32ee..e07ac1e21 100644 --- a/setup.py +++ b/setup.py @@ -54,9 +54,10 @@ install_requires=install_requires, setup_requires=['pytest-runner'], tests_require=[ - 'pytest >= 3.0', + 'pytest == 3.2.5', # last version still compatible with 2.6 & 3.3 'pytest-mock', 'mock;python_version<="3.3"', # only necessary for Python 3.3 + 'pytest-cov', ], classifiers=[ "Development Status :: 5 - Production/Stable", diff --git a/tox.ini b/tox.ini index fae555f18..2416cf614 100644 --- a/tox.ini +++ b/tox.ini @@ -15,7 +15,7 @@ deps = coverage commands = python setup.py clean --all - python -W all -bb -W error::BytesWarning -m coverage.__main__ run setup.py test {posargs} + python -W all -bb -W error::BytesWarning setup.py test --addopts "--cov=stripe {posargs}" setenv = STRIPE_TEST_PYCURL = true @@ -30,7 +30,7 @@ deps = commands = flake8 stripe tests python setup.py clean --all - python -W all -bb -W error::BytesWarning -m coverage.__main__ run setup.py test {posargs} + python -W all -bb -W error::BytesWarning setup.py test --addopts "--cov=stripe {posargs}" [flake8] exclude =