File tree Expand file tree Collapse file tree 3 files changed +8
-16
lines changed Expand file tree Collapse file tree 3 files changed +8
-16
lines changed Original file line number Diff line number Diff line change @@ -25,11 +25,11 @@ jobs:
2525 - name : Install dependencies
2626 run : |
2727 python -m pip install --upgrade pip
28- pip install flake8==3.8.4 pytest
28+ pip install flake8==3.8.4 pytest tox
2929 if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
3030 - name : Lint with flake8
3131 run : |
3232 python setup.py lint
3333 - name : Test with pytest
3434 run : |
35- python setup.py test
35+ tox
Original file line number Diff line number Diff line change 44from setuptools .command .test import test as TestCommand , Command
55
66
7- class PyTest (TestCommand ):
8- def finalize_options (self ):
9- TestCommand .finalize_options (self )
10- self .test_args = ["tests" , "-s" ]
11- self .test_suite = True
12-
13- def run_tests (self ):
14- import pytest
15-
16- errno = pytest .main (self .test_args )
17- raise SystemExit (errno )
18-
19-
207class LintCommand (Command ):
218 """
229 A copy of flake8's Flake8Command
@@ -96,7 +83,6 @@ def requirements():
9683 "pytest>=6.2,<7" ,
9784 ],
9885 cmdclass = {
99- "test" : PyTest ,
10086 "lint" : LintCommand ,
10187 },
10288)
Original file line number Diff line number Diff line change 1+ [tox]
2+ envlist = python3.9
3+
4+ [testenv]
5+ deps = pytest
6+ commands = pytest tests -s
You can’t perform that action at this time.
0 commit comments