File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ instance/
6767
6868# Scrapy stuff:
6969.scrapy
70+ .git
7071
7172# Sphinx documentation
7273docs /_build /
Original file line number Diff line number Diff line change 1717 "myst_parser" ,
1818]
1919
20+ # MyST is enabled for basic Markdown parsing only.
21+ # Keep advanced syntax extensions disabled unless explicitly needed.
22+ myst_enable_extensions = []
23+
2024templates_path = ["_templates" ]
2125exclude_patterns = []
2226
Original file line number Diff line number Diff line change 44Requires --reruns 1 (included in `make test`).
55"""
66
7+ import threading
8+
79attempt_counter = {"count" : 0 }
10+ attempt_lock = threading .Lock ()
811
912
1013def test_flaky_network_call ():
11- attempt_counter ["count" ] += 1
12- if attempt_counter ["count" ] == 1 :
14+ with attempt_lock :
15+ attempt_counter ["count" ] += 1
16+ is_first_attempt = attempt_counter ["count" ] == 1
17+
18+ if is_first_attempt :
1319 assert False , "Simulated network failure"
1420 assert True
You can’t perform that action at this time.
0 commit comments