MCPcopy Create free account
hub / github.com/TimMcCool/scratchattach / allow_before

Function allow_before

tests/src/util/__init__.py:53–59  ·  view source on GitHub ↗

Used with the `or` operator. If an assertion would be false, put the `allow_before` after the condition. If a test incorrectly errors, put the `allow_before` before the condition.

(d: datetime)

Source from the content-addressed store, hash-verified

51
52
53def allow_before(d: datetime) -> bool:
54 """
55 Used with the `or` operator.
56 If an assertion would be false, put the `allow_before` after the condition.
57 If a test incorrectly errors, put the `allow_before` before the condition.
58 """
59 return datetime.now() < d

Callers 2

test_userFunction · 0.90
test_projectFunction · 0.90

Calls

no outgoing calls

Tested by 2

test_userFunction · 0.72
test_projectFunction · 0.72