diff --git a/changelog/3547.bugfix.rst b/changelog/3547.bugfix.rst index 2c20661d5..b53e49c5c 100644 --- a/changelog/3547.bugfix.rst +++ b/changelog/3547.bugfix.rst @@ -1 +1 @@ -``--junitxml`` emits XML data compatible with JUnit's offical schema releases. +``--junitxml`` emits XML data compatible with Jenkins xUnit schemas via ``junit_family`` INI config option diff --git a/src/_pytest/junitxml.py b/src/_pytest/junitxml.py index 115067b70..96755cf5b 100644 --- a/src/_pytest/junitxml.py +++ b/src/_pytest/junitxml.py @@ -145,9 +145,8 @@ class _NodeReporter(object): if self.family == "xunit1": return - # Purge attributes not permitted by this test family - # This includes custom attributes, because they are not valid here. - # TODO: Convert invalid attributes to properties to preserve "something" + # Filter out attributes not permitted by this test family. + # Including custom attributes because they are not valid here. temp_attrs = {} for key in self.attrs.keys(): if key in families[self.family]["testcase"]: