mirror of
https://github.com/zulip/zulip.git
synced 2025-11-16 20:02:15 +00:00
python: Use isinstance with a tuple for testing multiple types.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
@@ -102,7 +102,7 @@ def enforce_timely_test_completion(test_method: Callable[..., ReturnT], test_nam
|
||||
else:
|
||||
max_delay = 0.4 # seconds
|
||||
|
||||
assert isinstance(result, TextTestResult) or isinstance(result, RemoteTestResult)
|
||||
assert isinstance(result, (TextTestResult, RemoteTestResult))
|
||||
|
||||
if delay > max_delay:
|
||||
msg = f'** Test is TOO slow: {test_name} ({delay:.3f} s)\n'
|
||||
|
||||
Reference in New Issue
Block a user