Skip to content

Commit

Permalink
Fix Jira tag in scenario outlines
Browse files Browse the repository at this point in the history
  • Loading branch information
rgonalo committed Feb 5, 2016
1 parent 2bada42 commit d6377db
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions toolium/behave/environment.py
Expand Up @@ -153,12 +153,15 @@ def after_all(context):


def get_jira_key_from_scenario(scenario):
"""Extract Jira Test Case key from scenario tags
"""Extract Jira Test Case key from scenario tags.
Two tag formats are allowed:
@jira('PROJECT-32')
@jira=PROJECT-32
:param scenario: behave scenario
:returns: Jira test case key
"""
jira_regex = re.compile('jira\(\'(.*?)\'\)')
jira_regex = re.compile('jira[=\(\']*([A-Z]+\-[0-9]+)[\'\)]*$')
for tag in scenario.tags:
match = jira_regex.search(tag)
if match:
Expand Down

0 comments on commit d6377db

Please sign in to comment.