The readme examples have several errors
Closed this issue · 0 comments
tpbradt commented
to_xml_string() example:
- Nothing is being passed to the to_xml_string() function
- Calling the function on the object "ts" instead of the TestSuite class. Errors if ts is already a list object.
Here is my version that works:
test_cases = [TestCase('Test1', 'some.class.name', 123.345, 'I am stdout!', 'I am stderr!')]
ts = [TestSuite("my test suite", test_cases)]
print(TestSuite.to_xml_string(ts))
to_file() example:
- Calling the function on the ts object. Should be on the class.
- function is "to_file()", not "write_to_file()" as listed.
- Might want to include f.close() just for those who may not know they need to close the file