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

Function check_timing

tests/test_waiting.py:409–422  ·  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

407
408
409def check_timing(request):
410 """Return true if the test run requires to check timing
411
412 Return false if the user has specified something like `pytest -m "not timing"
413
414 Allow to run the tests to verify if the responses are correct but ignoring
415 the timing, which on macOS and Windows in CI is very slow.
416 """
417 tokens = request.config.option.markexpr.split()
418 if "timing" not in tokens:
419 return True
420 if (idx := tokens.index("timing")) > 0 and tokens[idx - 1] == "not":
421 return False
422 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