Skip to content

Commit

Permalink
MOTOR-1133 [BUILD FAILURE] test.test_client.TestClient (#206)
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 committed May 12, 2023
1 parent a16d482 commit 440b3dc
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions synchro/synchrotest.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import importlib
import importlib.abc
import importlib.machinery
import re
import sys

import nose
Expand Down Expand Up @@ -185,6 +186,8 @@
"TestUnifiedFindShutdownError.test_Concurrent_shutdown_error_on_find",
"TestUnifiedInsertShutdownError.test_Concurrent_shutdown_error_on_insert",
"TestUnifiedPoolClearedError.test_PoolClearedError_does_not_mark_server_unknown",
# These tests have hard-coded values that differ from motor.
"TestClient.test_handshake.*",
]


Expand Down Expand Up @@ -258,11 +261,15 @@ def wantMethod(self, method):
classname = method.__self__.__class__.__name__

# Should we exclude this method's whole TestCase?
suite_name, method_name = excluded_name.split(".")
suite_name, _, method_name = excluded_name.partition(".")
suite_matches = suite_name in [classname, "*"]

# Should we exclude this particular method?
method_matches = method.__name__ == method_name or method_name == "*"
method_matches = (
method.__name__ == method_name
or method_name == "*"
or re.match(f"^{method_name}$", method.__name__)
)

if suite_matches and method_matches:
excluded_tests_matched.add(excluded_name)
Expand Down

0 comments on commit 440b3dc

Please sign in to comment.