MCPcopy
hub / github.com/streamlit/streamlit / _extract_flaky_tests

Function _extract_flaky_tests

scripts/fetch_flaky_tests.py:109–120  ·  view source on GitHub ↗

Extract tests that required reruns from test-stats.json.

(test_stats: dict[str, Any])

Source from the content-addressed store, hash-verified

107
108
109def _extract_flaky_tests(test_stats: dict[str, Any]) -> list[dict[str, Any]]:
110 """Extract tests that required reruns from test-stats.json."""
111 return [
112 {
113 "nodeid": detail["nodeid"],
114 "rerun_count": detail.get("rerun_count", 0),
115 "browser": detail.get("browser", "unknown"),
116 "final_outcome": detail.get("final_outcome", "unknown"),
117 }
118 for detail in test_stats.get("rerun_details", [])
119 if detail.get("rerun_count", 0) > 0
120 ]
121
122
123def _normalize_test_name(nodeid: str) -> str:

Callers 1

mainFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…