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:
25
25
- name : Install dependencies
26
26
run : |
27
27
python -m pip install --upgrade pip
28
- pip install flake8==3.8.4 pytest
28
+ pip install flake8==3.8.4 pytest tox
29
29
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
30
30
- name : Lint with flake8
31
31
run : |
32
32
python setup.py lint
33
33
- name : Test with pytest
34
34
run : |
35
- python setup.py test
35
+ tox
Original file line number Diff line number Diff line change 4
4
from setuptools .command .test import test as TestCommand , Command
5
5
6
6
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
-
20
7
class LintCommand (Command ):
21
8
"""
22
9
A copy of flake8's Flake8Command
@@ -96,7 +83,6 @@ def requirements():
96
83
"pytest>=6.2,<7" ,
97
84
],
98
85
cmdclass = {
99
- "test" : PyTest ,
100
86
"lint" : LintCommand ,
101
87
},
102
88
)
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