def test_fail_bad_specifier(self): errors = checks.check_python_version() assert len(errors) == 1 assert errors[0].id == "dvc.E002" assert errors[0].msg == ( "settings.VERSION_CHECKS['python'] is misconfigured. '3' is " + "not a valid PEP440 specifier.")
def test_fail_out_of_range(self): errors = checks.check_python_version() assert len(errors) == 1 assert errors[0].id == "dvc.E003" assert errors[0].msg.startswith("The current version of Python ") assert errors[0].msg.endswith( "does not match the specified range (<1.0).")
def test_fail_bad_type(self): errors = checks.check_python_version() assert len(errors) == 1 assert errors[0].id == "dvc.E001" assert errors[0].msg == ( "settings.VERSION_CHECKS['python'] is misconfigured. Expected " + "a str but got 3.")
def test_success_unspecified(self): errors = checks.check_python_version() assert errors == []
def test_success_in_range(self): errors = checks.check_python_version() assert errors == []