def assert_not_match(req: VersionReq, vers: typing.Iterable[str]): for ver in vers: assert not req.matches(version(ver)), "matched {}".format(ver)
def assert_match(req: VersionReq, vers: typing.Iterable[str]): for ver in vers: assert req.matches(version(ver)), "didn't match {}".format(ver)