Skip to content

Commit 38711de

Browse files
authored
Update package (#245)
* Update versions and other documentations * Update gitignore * update test * remove unwanted cli
1 parent 127f6bd commit 38711de

2 files changed

Lines changed: 14 additions & 7 deletions

File tree

pytest_html_plus/plugin.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
"html-output": {"flag": "--html-output", "kind": "value"},
3838
"screenshots": {"flag": "--screenshots", "kind": "value"},
3939
"plus-email": {"flag": "--plus-email", "kind": "bool"},
40-
"detect-flake": {"flag": "--detect-flake", "kind": "value"},
4140
"should-open-report": {"flag": "--should-open-report", "kind": "value"},
4241
"generate-xml": {"flag": "--generate-xml", "kind": "bool"},
4342
"xml-report": {"flag": "--xml-report", "kind": "value"},
@@ -449,12 +448,6 @@ def pytest_addoption(parser):
449448
default=False,
450449
help="Send HTML test report via email after test run",
451450
)
452-
group.addoption(
453-
"--detect-flake",
454-
action="store",
455-
default=False,
456-
help="Helps capture flaky tests in the last n number of builds",
457-
)
458451
group.addoption(
459452
"--should-open-report",
460453
action="store",

tests/e2e/test_flaky_simulation.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
"""
2+
Simulated flaky test — fails on the first attempt, passes on retry.
3+
Demonstrates flaky test detection in the HTML report.
4+
Requires --reruns 1 (included in `make test`).
5+
"""
6+
7+
attempt_counter = {"count": 0}
8+
9+
10+
def test_flaky_network_call():
11+
attempt_counter["count"] += 1
12+
if attempt_counter["count"] == 1:
13+
assert False, "Simulated network failure"
14+
assert True

0 commit comments

Comments
 (0)