MCPcopy
hub / github.com/psycopg/psycopg / check_timing

Function check_timing

tests/test_waiting_async.py:417–430  ·  view source on GitHub ↗

Return true if the test run requires to check timing Return false if the user has specified something like `pytest -m "not timing" Allow to run the tests to verify if the responses are correct but ignoring the timing, which on macOS and Windows in CI is very slow.

(request)

Source from the content-addressed store, hash-verified

415
416
417def check_timing(request):
418 """Return true if the test run requires to check timing
419
420 Return false if the user has specified something like `pytest -m "not timing"
421
422 Allow to run the tests to verify if the responses are correct but ignoring
423 the timing, which on macOS and Windows in CI is very slow.
424 """
425 tokens = request.config.option.markexpr.split()
426 if "timing" not in tokens:
427 return True
428 if (idx := tokens.index("timing")) > 0 and tokens[idx - 1] == "not":
429 return False
430 return True

Callers 4

test_wait_rFunction · 0.70
test_wait_r_no_linuxFunction · 0.70
test_wait_r_nowaitFunction · 0.70
test_wait_wFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected