Skip to content

Commit 84bba34

Browse files
committed
Handle flaky windows test by rerunning
1 parent 727b305 commit 84bba34

File tree

3 files changed

+63
-60
lines changed

3 files changed

+63
-60
lines changed

.pre-commit-config.yaml

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,58 @@
11
repos:
2-
- repo: https://github.com/psf/black
3-
rev: 19.10b0
4-
hooks:
5-
- id: black
6-
args: [--safe, --quiet]
7-
- repo: https://github.com/asottile/blacken-docs
8-
rev: v1.7.0
9-
hooks:
10-
- id: blacken-docs
11-
additional_dependencies: [black==19.10b0]
12-
- repo: https://github.com/pre-commit/pre-commit-hooks
13-
rev: v3.1.0
14-
hooks:
15-
- id: trailing-whitespace
16-
- id: end-of-file-fixer
17-
- id: fix-encoding-pragma
18-
args: [--remove]
19-
- id: check-yaml
20-
- id: debug-statements
21-
language_version: python3
22-
- repo: https://gitlab.com/pycqa/flake8
23-
rev: 3.8.2
24-
hooks:
25-
- id: flake8
26-
language_version: python3
27-
additional_dependencies:
28-
- flake8-builtins==1.5.3
29-
- flake8-typing-imports==1.9.0
30-
- repo: https://github.com/asottile/reorder_python_imports
31-
rev: v2.3.0
32-
hooks:
33-
- id: reorder-python-imports
34-
args: ['--application-directories=.:src:testing', --py3-plus]
35-
- repo: https://github.com/asottile/pyupgrade
36-
rev: v2.4.4
37-
hooks:
38-
- id: pyupgrade
39-
args: [--py3-plus]
40-
- repo: https://github.com/pre-commit/mirrors-eslint
41-
rev: v7.13.0
42-
hooks:
43-
- id: eslint
44-
additional_dependencies:
45-
46-
args: [src]
47-
- repo: local
48-
hooks:
49-
- id: rst
50-
name: rst
51-
entry: rst-lint --encoding utf-8
52-
files: ^(CHANGES.rst|development.rst|README.rst)$
53-
language: python
54-
additional_dependencies: [pygments, restructuredtext_lint]
55-
- repo: https://github.com/elidupuis/mirrors-sass-lint
56-
rev: '5cc45653263b423398e4af2561fae362903dd45d'
57-
hooks:
58-
- id: sass-lint
2+
- repo: https://github.com/psf/black
3+
rev: 20.8b1
4+
hooks:
5+
- id: black
6+
args: [--safe, --quiet]
7+
- repo: https://github.com/asottile/blacken-docs
8+
rev: v1.7.0
9+
hooks:
10+
- id: blacken-docs
11+
additional_dependencies: [black==20.8b1]
12+
- repo: https://github.com/pre-commit/pre-commit-hooks
13+
rev: v3.1.0
14+
hooks:
15+
- id: trailing-whitespace
16+
- id: end-of-file-fixer
17+
- id: fix-encoding-pragma
18+
args: [--remove]
19+
- id: check-yaml
20+
- id: debug-statements
21+
language_version: python3
22+
- repo: https://gitlab.com/pycqa/flake8
23+
rev: 3.8.4
24+
hooks:
25+
- id: flake8
26+
language_version: python3
27+
additional_dependencies:
28+
- flake8-builtins==1.5.3
29+
- flake8-typing-imports==1.9.0
30+
- repo: https://github.com/asottile/reorder_python_imports
31+
rev: v2.3.0
32+
hooks:
33+
- id: reorder-python-imports
34+
args: ["--application-directories=.:src:testing", --py3-plus]
35+
- repo: https://github.com/asottile/pyupgrade
36+
rev: v2.4.4
37+
hooks:
38+
- id: pyupgrade
39+
args: [--py3-plus]
40+
- repo: https://github.com/pre-commit/mirrors-eslint
41+
rev: v7.13.0
42+
hooks:
43+
- id: eslint
44+
additional_dependencies:
45+
46+
args: [src]
47+
- repo: local
48+
hooks:
49+
- id: rst
50+
name: rst
51+
entry: rst-lint --encoding utf-8
52+
files: ^(CHANGES.rst|development.rst|README.rst)$
53+
language: python
54+
additional_dependencies: [pygments, restructuredtext_lint]
55+
- repo: https://github.com/elidupuis/mirrors-sass-lint
56+
rev: "5cc45653263b423398e4af2561fae362903dd45d"
57+
hooks:
58+
- id: sass-lint

Pipfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ verify_ssl = true
66
[dev-packages]
77
pytest = "*"
88
tox = "*"
9-
flake8 = "*"
10-
black = "*"
9+
flake8 = "==3.8.4"
10+
black = "==20.8b1"
1111
pre-commit = "*"
12+
pytest-rerunfailures = "*"
1213

1314
[packages]
1415
pytest-html = {editable = true,path = "."}

testing/test_pytest_html.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ def test_fail(self, testdir):
186186
assert_results(html, passed=0, failed=1)
187187
assert "AssertionError" in html
188188

189+
@pytest.mark.flaky(reruns=2) # test is flaky on windows
189190
def test_rerun(self, testdir):
190191
testdir.makeconftest(
191192
"""
@@ -898,7 +899,8 @@ def test_foo(val):
898899
assert_results(html, passed=1)
899900

900901
@pytest.mark.parametrize(
901-
"with_ansi", [True, False],
902+
"with_ansi",
903+
[True, False],
902904
)
903905
def test_ansi_color(self, testdir, mocker, with_ansi):
904906
if not with_ansi:

0 commit comments

Comments
 (0)