mirror of
https://github.com/langgenius/dify.git
synced 2026-10-16 15:35:32 +08:00
test(api): stabilize shared fixtures and type-check scopes (#42801)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user