Ensure xml object is viable before testing family type
This commit is contained in:
parent
bcacc40775
commit
8967976443
|
@ -311,7 +311,7 @@ def record_xml_attribute(request):
|
||||||
attr_func = add_attr_noop
|
attr_func = add_attr_noop
|
||||||
xml = getattr(request.config, "_xml", None)
|
xml = getattr(request.config, "_xml", None)
|
||||||
|
|
||||||
if xml.family != "xunit1":
|
if xml is not None and xml.family != "xunit1":
|
||||||
request.node.warn(
|
request.node.warn(
|
||||||
PytestWarning(
|
PytestWarning(
|
||||||
"record_xml_attribute is incompatible with junit_family: "
|
"record_xml_attribute is incompatible with junit_family: "
|
||||||
|
|
Loading…
Reference in New Issue