MCPcopy Index your code
hub / github.com/pex-tool/pex / assert_requires_python

Function assert_requires_python

tests/test_targets.py:118–127  ·  view source on GitHub ↗
(
        expected_result,  # type: bool
        template,  # type: str
    )

Source from the content-addressed store, hash-verified

116 return template.format(major=major, minor=minor, patch=patch)
117
118 def assert_requires_python(
119 expected_result, # type: bool
120 template, # type: str
121 ):
122 # type: (...) -> None
123 assert_python_requirement_applies(
124 expected_result=expected_result,
125 target=current_target,
126 python_requirement=requires_python(template),
127 )
128
129 assert_requires_python(True, "~={major}.{minor}")
130

Calls 2

requires_pythonFunction · 0.70

Tested by

no test coverage detected