Skip to content

Commit

Permalink
Markers parsing unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
jyejare committed Dec 11, 2023
1 parent cce8cf2 commit e0448a9
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/test_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,17 @@ def test_parse_rst_special_characters():
u'<p>String with special character like é</p>\n'
u'</main>\n'
)

def test_parse_markers():
_mod_markers = ['pytest.mark.e2e', 'pytest.mark.destructive']
_class_markers = ['pytest.mark.on_prem_provisioning', "pytest.mark.usefixtures('cleandir')"]
_test_markers = [
"pytest.mark.parametrize('something', ['a', 'b'])",
"pytest.mark.skipif(not settings.robottelo.REPOS_HOSTING_URL)",
"pytest.mark.tier1"
]
_all_markers = [_mod_markers, _class_markers, _test_markers]

expected = 'e2e, destructive, on_prem_provisioning, tier1'

assert parser.parse_markers(_all_markers) == expected

0 comments on commit e0448a9

Please sign in to comment.