Skip to content

Commit 1a461d8

Browse files
authored
build: 🔨 move pytest options into pytest.ini so VS Code detects them (#59)
## Description To match changes made in Sprout.
1 parent e7b7c40 commit 1a461d8

File tree

3 files changed

+11
-15
lines changed

3 files changed

+11
-15
lines changed

.github/sync.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ group:
1313
dest: justfile
1414
- source: .cz.toml
1515
dest: .cz.toml
16+
- source: pytest.ini
17+
dest: pytest.ini
1618
- source: ruff.toml
1719
dest: ruff.toml
1820
- source: LICENSE.md

justfile

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,7 @@ install-deps:
1010

1111
# Run the Python tests
1212
test-python:
13-
# - A short traceback (tb) mode to make it easier to view
14-
# - Use the `src/` package (importlib)
15-
# - Use code coverage on the `src/` package
16-
# - If tests fail, do not generate coverage report
17-
# - Create the coverage report in XML (for badge), terminal, and HTML
18-
# - Trigger failure if below 90% code coverage
19-
uv run pytest \
20-
--tb=short \
21-
--import-mode=importlib \
22-
--cov=src \
23-
--no-cov-on-fail \
24-
--cov-report=term \
25-
--cov-report=xml \
26-
--cov-report=html \
27-
--cov-fail-under=90
13+
uv run pytest
2814
# Make the badge from the coverage report
2915
uv run genbadge coverage \
3016
-i coverage.xml \

pytest.ini

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[pytest]
2+
# - A short traceback (tb) mode to make it easier to view
3+
# - Use the `src/` package (importlib)
4+
# - Use code coverage on the `src/` package
5+
# - If tests fail, do not generate coverage report
6+
# - Create the coverage report in XML (for badge), terminal, and HTML
7+
# - Trigger failure if below 90% code coverage
8+
addopts = --tb=short --import-mode=importlib --cov=src --no-cov-on-fail --cov-report=term --cov-report=xml --cov-report=html --cov-fail-under=90

0 commit comments

Comments
 (0)