def test_isvalid_method(subject, isvalid): assert SemVer.isvalid(subject) == isvalid
def test_passing_version_flag_prints_version_and_exits(args, capsys): with pytest.raises(SystemExit): main(args) c = capsys.readouterr() assert SemVer.isvalid(c.out)