Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 70bbb0e

Browse files
committedOct 3, 2019
Remove pytest runner to run test
This was the case already when running test manually but not when running tox or travis
1 parent 430ac15 commit 70bbb0e

File tree

3 files changed

+5
-20
lines changed

3 files changed

+5
-20
lines changed
 

‎requirements-development.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,3 @@ pytest-factoryboy==2.0.3
1414
recommonmark==0.6.0
1515
Sphinx==2.2.0
1616
sphinx_rtd_theme==0.4.3
17-
twine==2.0.0

‎setup.py

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,6 @@
77

88
from setuptools import setup
99

10-
needs_pytest = {'pytest', 'test', 'ptr'}.intersection(sys.argv)
11-
pytest_runner = ['pytest-runner'] if needs_pytest else []
12-
needs_sphinx = {'build_sphinx', 'upload_docs'}.intersection(sys.argv)
13-
sphinx = ['sphinx'] if needs_sphinx else []
14-
needs_wheel = {'bdist_wheel'}.intersection(sys.argv)
15-
wheel = ['wheel'] if needs_wheel else []
16-
1710

1811
def read(*paths):
1912
"""
@@ -97,16 +90,6 @@ def get_package_data(package):
9790
'djangorestframework>=3.10',
9891
'django>=1.11',
9992
],
100-
setup_requires=pytest_runner + sphinx + wheel,
101-
tests_require=[
102-
'pytest-factoryboy',
103-
'factory-boy',
104-
'pytest-django',
105-
'pytest',
106-
'pytest-cov',
107-
'django-polymorphic>=2.0',
108-
'django-filter>=2.0',
109-
'django-debug-toolbar==1.11'
110-
],
93+
python_requires=">=3.5",
11194
zip_safe=False,
11295
)

‎tox.ini

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,23 @@ deps =
1010
django22: Django>=2.2,<2.3
1111
drf310: djangorestframework>=3.10.2,<3.11
1212
drfmaster: https://github.com/encode/django-rest-framework/archive/master.zip
13+
-rrequirements-development.txt
1314

1415
setenv =
1516
PYTHONPATH = {toxinidir}
1617
DJANGO_SETTINGS_MODULE=example.settings.test
1718

1819
commands =
19-
python setup.py test --addopts '--cov --no-cov-on-fail --cov-report xml' {posargs}
20+
pytest --cov --no-cov-on-fail --cov-report xml {posargs}
2021

2122
[testenv:flake8]
23+
basepython = python3.6
2224
deps =
2325
-rrequirements-development.txt
2426
commands = flake8
2527

2628
[testenv:sphinx]
29+
basepython = python3.6
2730
deps =
2831
-rrequirements-development.txt
2932
commands =

0 commit comments

Comments
 (0)
Please sign in to comment.