@with_setup(prepare_stdout, registry.clear)
def test_xunit_xml_output_with_no_errors():
 called = []
 def assert_correct_xml_output(filename, doc):
  called.append(True)
  expect(doc.toxml).when.called.doesnt.throw(UnicodeDecodeError)
 old = xunit_output.write_xml_doc
 xunit_output.write_xml_doc = assert_correct_xml_output
 runner = Runner(feature_name('xunit_unicode_and_bytestring_mixing'), enable_xunit=True)
 try:
  runner.run()
 finally:
  xunit_output.write_xml_doc = old

@ with_setup ( prepare_stdout , registry . clear ) def test_xunit_xml_output_with_no_errors ( ) : called = [ ] def assert_correct_xml_output ( filename , doc ) : called . append ( True ) expect ( doc . toxml ) . when . called . doesnt . throw ( UnicodeDecodeError ) old = xunit_output . write_xml_doc xunit_output . write_xml_doc = assert_correct_xml_output runner = Runner ( feature_name ( 'xunit_unicode_and_bytestring_mixing' ) , enable_xunit = True ) try : runner . run ( ) finally : xunit_output . write_xml_doc = old
test xunit doc xml output .