Skip to content

Commit

Permalink
Merge pull request #15 from pbenas/junit_status
Browse files Browse the repository at this point in the history
Display plugin result in the junit output
  • Loading branch information
Filip Pytloun committed Feb 16, 2015
2 parents 19394f6 + f7fda16 commit dc9f57d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
18 changes: 9 additions & 9 deletions smoker/client/out_junit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
Important is to properly set 'classname' and 'name' attributes for testcase elements.
'''


import yaml
import collections
from cgi import escape
import collections
import yaml

import rows
from xml_builder import XmlBuilder
import default_config
import rows
from xml_builder import XmlBuilder


def plugins_to_xml(dict_data,
yaml_filename=None,
Expand All @@ -36,7 +36,7 @@ def plugins_to_xml(dict_data,
ts_attr='HtmlTestSuiteAttr',
tc_attr='HtmlTestCaseAttr',
tc_elem='HtmlTestCaseElem'):
'''
"""
Provided data (from plugins dictionary) and walking template, get all valid items and convert it to jUnit xml representation.
Function have sane defaults (depends on calee opinion):
Expand All @@ -51,9 +51,9 @@ def plugins_to_xml(dict_data,
:rval: string
:return: returns xml structure (testsuites corresponds to nodes, testcases to plugin)
'''
"""
def apply(inst, custom_dict=None, **kwargs):
'''
"""
Dynamically applies value of value as new value.
>>> inst
Expand All @@ -64,7 +64,7 @@ def apply(inst, custom_dict=None, **kwargs):
{ 'name': 'node', 'classname': 'ClassName'}
>>> apply(inst, custom_dict=custom_dict)
{ 'name': 'sgt-c3', 'classname': 'stg-c3.alog'}
'''
"""
applied_args = {}
if custom_dict:
for k, v in custom_dict.iteritems():
Expand Down
1 change: 1 addition & 0 deletions smoker/client/out_junit/default_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
HtmlTestCaseAttr:
classname: ClassName
name: CaseName
status: PluginStatus
All:
Expand Down

0 comments on commit dc9f57d

Please sign in to comment.