File tree 3 files changed +9
-12
lines changed
3 files changed +9
-12
lines changed Original file line number Diff line number Diff line change 41
41
42
42
- name : Run unit tests and doctests.
43
43
shell : bash -l {0}
44
- run : tox -e pytest -- src tests -m "unit or (not integration and not end_to_end)" --cov=./ --cov-report=xml -n auto
44
+ run : tox -e pytest -- -m "unit or (not integration and not end_to_end)" --cov=src --cov=tests --cov-report=xml -n auto
45
45
46
46
- name : Upload coverage report for unit tests and doctests.
47
47
if : runner.os == 'Linux' && matrix.python-version == '3.8'
50
50
51
51
- name : Run integration tests.
52
52
shell : bash -l {0}
53
- run : tox -e pytest -- src tests -m integration --cov=./ --cov-report=xml -n auto
53
+ run : tox -e pytest -- -m integration --cov=src --cov=tests --cov-report=xml -n auto
54
54
55
55
- name : Upload coverage reports of integration tests.
56
56
if : runner.os == 'Linux' && matrix.python-version == '3.8'
59
59
60
60
- name : Run end-to-end tests.
61
61
shell : bash -l {0}
62
- run : tox -e pytest -- src tests -m end_to_end --cov=./ --cov-report=xml -n auto
62
+ run : tox -e pytest -- -m end_to_end --cov=src --cov=tests --cov-report=xml -n auto
63
63
64
64
- name : Upload coverage reports of end-to-end tests.
65
65
if : runner.os == 'Linux' && matrix.python-version == '3.8'
Original file line number Diff line number Diff line change @@ -175,4 +175,5 @@ def task_example():
175
175
assert result .exit_code == ExitCode .OK
176
176
assert "Warnings" in result .output
177
177
assert "warning!!!" in result .output
178
- assert result .output .count ("task_example" ) == 31
178
+ # One occurrence is sometimes clipped.
179
+ assert result .output .count ("task_example" ) in [30 , 31 ]
Original file line number Diff line number Diff line change 1
1
[tox]
2
2
envlist = pytest, sphinx
3
- skipsdist = True
4
- skip_missing_interpreters = True
5
- whitelist_externals = python
6
3
7
4
[testenv]
8
- basepython = python
5
+ usedevelop = true
9
6
10
7
[testenv:pytest]
11
8
conda_channels =
@@ -36,7 +33,6 @@ conda_deps =
36
33
pydot
37
34
38
35
commands =
39
- pip install --no-deps -e .
40
36
pytest {posargs}
41
37
42
38
[testenv:sphinx]
@@ -71,6 +67,9 @@ warn-symbols =
71
67
pytest.mark.wip = Remove ' wip' mark for tests.
72
68
73
69
[pytest]
70
+ testpaths =
71
+ src
72
+ tests
74
73
addopts = --doctest-modules
75
74
filterwarnings =
76
75
ignore: the imp module is deprecated in favour of importlib
@@ -81,6 +80,3 @@ markers =
81
80
unit: Flag for unit tests which target mainly a single function.
82
81
integration: Flag for integration tests which may comprise of multiple unit tests.
83
82
end_to_end: Flag for tests that cover the whole program.
84
- norecursedirs =
85
- .idea
86
- .tox
You can’t perform that action at this time.
0 commit comments