Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit75cf540

Browse files
committed
Keep sugar for local use, but use instafail on CI
There are two benefits of the pytest-sugar plugin:1. Pretty output.2. Show details on each failure immediately instead of at the end.The first benefit is effectively local-only, because extra newlinesare appearing when it runs on CI, both with and without -v.The second benefit applies both locally and on CI.So this adds the pytest-instafail plugin and uses it on CI to getthe second benefit. It is not set up to run automatically, andpytest-sugar still is (though no longer forced), so local testingretains no benefit and we don't have a clash.The name "instafail" refers only to instantly *seeing* failures:it does not cause the pytest runner to stop earlier than otherwise.
1 parent680d795 commit75cf540

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

‎.github/workflows/cygwin-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,4 @@ jobs:
6464
-name:Test with pytest
6565
run:|
6666
set +x
67-
/usr/bin/python -m pytest -v
67+
/usr/bin/python -m pytest -p no:sugar -v --instafail

‎.github/workflows/pythonpackage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878

7979
-name:Test with pytest
8080
run:|
81-
pytest -v
81+
pytest -v -p no:sugar --instafail
8282
continue-on-error:false
8383

8484
-name:Documentation

‎pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
55
[tool.pytest.ini_options]
66
python_files ='test_*.py'
77
testpaths ='test'# space separated list of paths from root e.g test tests doc/testing
8-
addopts ='--cov=git --cov-report=term --force-sugar --disable-warnings'
8+
addopts ='--cov=git --cov-report=term --disable-warnings'
99
filterwarnings ='ignore::DeprecationWarning'
1010
# --cov coverage
1111
# --cov-report term # send report to terminal term-missing -> terminal with line numbers html xml

‎test-requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ mypy
55
pre-commit
66
pytest
77
pytest-cov
8+
pytest-instafail
89
pytest-sugar

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp