简体   繁体   中英

No print to stdout when running xmlrunner in python

I'm using xmlrunner in combination with unittest in python for testing purposes by running

xmlrunner.XMLTestRunner(outsuffix="",).run(suite)

where suite is standard unittest.suite.TestSuite

When I run the tests on my windows machine I get an output by using the standard print() function in my tests. Unfortunately I don't get any output to my terminal when running the tests on my fedora machine. The output is correctly logged to an XML file but I would like to have the output directly to stdout / terminal.

Did I miss something that explains this behaviour?

OK, I found the reason. On my Fedora 24 machine an old version of xmlrunner (1.14.0 - something) was installed. I used pip to install the lates xmlrunner (1.7.7) for python3 and now I do get the output directly on the terminal.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM