!OPTIONS: --var MIN_VERSION=(3,5) # A !REQUIRES directive is executed before any test. # The .should file is taken into account only if the !REQUIRES command exits with 0. !REQUIRES: python3 -c "import sys; sys.exit(0 if sys.version_info >= $MIN_VERSION else 1)" # Note that !REQUIRES directives may also use variables, defined above # We test here a function that was introduced in Python 3.5. python3 -c "import math; print(math.isclose(math.pi, 3.14, rel_tol=0.01))" $ Correct output of math.isclose() 1: True