test(api): stabilize shared fixtures and type-check scopes (#42801)

This commit is contained in:
-LAN-
2026-10-02 23:48:13 +00:00
committed by GitHub
parent 4b89972f55
commit baf6888007
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -119,6 +119,8 @@ def _patch_redis_clients() -> Iterator[None]:
def reset_redis_mock(_patch_redis_clients: None) -> None:
"""Reset the shared Redis mock after per-test client rebinding."""
redis_mock.reset_mock()
# Restoring a monkeypatched method can leave it detached from the parent's reset traversal.
redis_mock.delete.reset_mock()
redis_mock.get.return_value = None
redis_mock.setex.return_value = None
redis_mock.setnx.return_value = None
+2
View File
@@ -78,6 +78,7 @@ if (( ${#target_paths[@]} == 0 )); then
unit_tests_args=(
"--summary=none"
"--use-ignore-files=false"
"--disable-project-excludes-heuristics=true"
"--config=$UNIT_TESTS_CONFIG"
)
if [[ "${PYREFLY_OUTPUT_FORMAT:-}" == "github" ]]; then
@@ -91,6 +92,7 @@ if (( ${#target_paths[@]} == 0 )); then
test_containers_args=(
"--summary=none"
"--use-ignore-files=false"
"--disable-project-excludes-heuristics=true"
"--config=$TEST_CONTAINERS_CONFIG"
)
if [[ "${PYREFLY_OUTPUT_FORMAT:-}" == "github" ]]; then