tests: Allow @qt<... marker for BDD tests

This commit is contained in:
Florian Bruhin 2017-04-08 19:20:53 +02:00
parent 0068d87382
commit c23e4b1c5f

View File

@ -68,7 +68,7 @@ def _get_version_tag(tag):
""" """
version_re = re.compile(r""" version_re = re.compile(r"""
(?P<package>qt|pyqt) (?P<package>qt|pyqt)
(?P<operator>==|>=|!=) (?P<operator>==|>=|!=|<)
(?P<version>\d+\.\d+(\.\d+)?) (?P<version>\d+\.\d+(\.\d+)?)
""", re.VERBOSE) """, re.VERBOSE)
@ -84,6 +84,7 @@ def _get_version_tag(tag):
do_skip = { do_skip = {
'==': not qtutils.version_check(version, exact=True), '==': not qtutils.version_check(version, exact=True),
'>=': not qtutils.version_check(version), '>=': not qtutils.version_check(version),
'<': qtutils.version_check(version),
'!=': qtutils.version_check(version, exact=True), '!=': qtutils.version_check(version, exact=True),
} }
return pytest.mark.skipif(do_skip[op], reason='Needs ' + tag) return pytest.mark.skipif(do_skip[op], reason='Needs ' + tag)