Skip to content

Commit 298a412

Browse files
[pre-commit.ci] pre-commit autoupdate (#47)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/editorconfig-checker/editorconfig-checker.python: 3.4.0 → 3.6.0](editorconfig-checker/editorconfig-checker.python@3.4.0...3.6.0) - [github.com/psf/black-pre-commit-mirror: 25.9.0 → 26.1.0](psf/black-pre-commit-mirror@25.9.0...26.1.0) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 8b266d6 commit 298a412

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ repos:
77
- id: check-yaml
88
- id: check-added-large-files
99
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
10-
rev: '3.4.0'
10+
rev: '3.6.0'
1111
hooks:
1212
- id: editorconfig-checker
1313
alias: ec
@@ -17,6 +17,6 @@ repos:
1717
- id: isort
1818
name: isort (python)
1919
- repo: https://github.com/psf/black-pre-commit-mirror
20-
rev: 25.9.0
20+
rev: 26.1.0
2121
hooks:
2222
- id: black

tests/test_pytest_execution_timer.py

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,12 @@ def test_shows_help_when_enabled(pytester):
1010

1111

1212
def test_does_not_emit_when_not_enabled(pytester):
13-
pytester.makepyfile(
14-
"""
13+
pytester.makepyfile("""
1514
import time
1615
1716
def test_execution():
1817
time.sleep(0.2)
19-
"""
20-
)
18+
""")
2119
result = pytester.runpytest()
2220
assert result.ret == 0
2321
# Confirm that the plugin output is not present
@@ -26,28 +24,24 @@ def test_execution():
2624

2725

2826
def test_omits_duration_when_enabled(pytester):
29-
pytester.makepyfile(
30-
"""
27+
pytester.makepyfile("""
3128
import time
3229
3330
def test_execution():
3431
time.sleep(0.2)
35-
"""
36-
)
32+
""")
3733
result = pytester.runpytest("--execution-timer")
3834
assert result.ret == 0
3935
result.stdout.fnmatch_lines(["*Durations*", "*0.*pytest_runtestloop*"])
4036

4137

4238
def test_configured_duration_is_used(pytester):
43-
pytester.makepyfile(
44-
"""
39+
pytester.makepyfile("""
4540
import time
4641
4742
def test_execution():
4843
time.sleep(0.1)
49-
"""
50-
)
44+
""")
5145
result = pytester.runpytest("--execution-timer", "--minimum-duration=100")
5246
assert result.ret == 0
5347
result.stdout.fnmatch_lines(["*Durations*", "*0.*pytest_runtestloop*"])

0 commit comments

Comments
 (0)