File tree Expand file tree Collapse file tree 5 files changed +48
-25
lines changed Expand file tree Collapse file tree 5 files changed +48
-25
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -49,10 +49,11 @@ jobs:
49
49
run : |
50
50
tox -e py-test
51
51
52
- - name : Test latest Python version with tox and get coverage
53
- if : matrix.python-version == '3.x '
52
+ - name : Upload code coverage
53
+ if : matrix.python-version == '3.7' && matrix.platform == 'ubuntu-latest '
54
54
run : |
55
- tox -vv -e py-cov
55
+ pip install codecov || true
56
+ codecov || true
56
57
57
58
- name : Test latest Python version with tox and mypy
58
59
if : matrix.python-version == '3.x'
63
64
run : |
64
65
tox -vv -e py-mypy
65
66
66
- - name : Upload code coverage
67
- if : matrix.python-version == '3.x'
68
- run : |
69
- pip install codecov || true
70
- codecov || true
71
-
72
67
test-docs :
73
68
runs-on : ubuntu-latest
74
69
Original file line number Diff line number Diff line change
1
+ [tool:pytest]
2
+ # do not litter the working directory
3
+ cache_dir = /tmp/pytest_cache
4
+ # slightly more verbose output
5
+ console_output_style = count
6
+ addopts =
7
+ # show all skipped/failed/xfailed tests in the summary except passed
8
+ -ra
9
+ --strict-config
10
+ # record coverage in these two packages
11
+ --cov =beets
12
+ --cov =beetsplug
13
+ # save xml for coverage upload
14
+ --cov-report =xml:.reports/coverage.xml
15
+ # save html files for local dev use
16
+ --cov-report =html:.reports/html
17
+ # record coverage across logical branches
18
+ --cov-branch
19
+ # show which tests cover specific lines in the code (available in HTML)
20
+ --cov-context =test
21
+
22
+ [coverage:run]
23
+ data_file = .reports/coverage/data
24
+ branch = true
25
+ relative_files = true
26
+
27
+ [coverage:report]
28
+ precision = 2
29
+ skip_empty = true
30
+ show_missing = true
31
+ exclude_lines =
32
+ pragma: no cover
33
+ if TYPE_CHECKING
34
+ if typing.TYPE_CHECKING
35
+ raise AssertionError
36
+ raise NotImplementedError
37
+
38
+ [coverage:html]
39
+ show_contexts = true
40
+
1
41
[flake8]
2
42
min-version = 3.6
3
43
accept-encodings = utf-8
Original file line number Diff line number Diff line change @@ -103,11 +103,11 @@ def build_manpages():
103
103
extras_require = {
104
104
"test" : [
105
105
"beautifulsoup4" ,
106
- "coverage" ,
107
106
"flask" ,
108
107
"mock" ,
109
108
"pylast" ,
110
109
"pytest" ,
110
+ "pytest-cov" ,
111
111
"python-mpd2" ,
112
112
"python3-discogs-client>=2.3.15" ,
113
113
"py7zr" ,
Original file line number Diff line number Diff line change 25
25
mypy: {[_mypy]deps}
26
26
passenv = INTEGRATION_TEST
27
27
commands =
28
- test: python -bb -m pytest -rs {posargs}
29
- cov: coverage run -m pytest -rs {posargs}
28
+ test: python -m pytest {posargs}
30
29
lint: python -m flake8 {posargs} {[_lint]files}
31
30
mypy: mypy -p beets -p beetsplug
32
31
mypy: mypy test
65
64
black ==24.2.0
66
65
skip_install = True
67
66
commands =
68
- isort beets beetsplug test --check
69
- black beets beetsplug test --check
70
-
67
+ isort beets beetsplug test --check --diff
68
+ black beets beetsplug test --check --diff
You can’t perform that action at this time.
0 commit comments