Skip to content

Commit baa439c

Browse files
committed
move pytest config to pyproject.toml
1 parent 9fb70bb commit baa439c

File tree

3 files changed

+30
-9
lines changed

3 files changed

+30
-9
lines changed

.circleci/config.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,7 @@ jobs:
9999
name: Run test suite
100100
command: >-
101101
pipenv
102-
run pytest tests
103-
--showlocals
104-
--durations=10
105-
-n auto
106-
--cov=sshtunnel
107-
--cov-report=html:test_results/coverage.html
108-
--cov-report=term
109-
--junit-xml=test_results/report.xml
102+
run pytest
110103
- run:
111104
name: Move coverage file
112105
command: |

pyproject.toml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,31 @@
11
[build-system]
22
requires = ["setuptools", "wheel"]
33
build-backend = "setuptools.build_meta:__legacy__"
4+
5+
[tool]
6+
7+
[tool.pytest]
8+
addopts = [
9+
"-n auto",
10+
"--showlocals",
11+
"--durations=10",
12+
"--cov=sshtunnel",
13+
"--cov-report=term",
14+
"--cov-report=html:test_results/coverage.html",
15+
"--junit-xml=test_results/report.xml",
16+
]
17+
testpaths = [
18+
"tests",
19+
]
20+
21+
[tool.coverage]
22+
23+
[tool.coverage.run]
24+
branch = true
25+
relative_files = true
26+
27+
[tool.coverage.report]
28+
exclude_also = [
29+
'if __name__ == "__main__":',
30+
"main\\(\\)",
31+
]

tests/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
coveralls
22
mock
3-
pytest>=4
3+
pytest>=6
44
pytest-cov
55
pytest-xdist
66
setuptools

0 commit comments

Comments
 (0)