![]() |
Writing unit test results into a text file - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Writing unit test results into a text file (/thread-30962.html) |
Writing unit test results into a text file - ateestructural - Nov-15-2020 I want to write the results of my unit tests into a text file but it does not seem to be working. Here is my code: I shall be grateful if someone can please help? unit tests: Quote:import unittest Writing to a text file. Here is the problem Quote:def main(out = sys.stderr, verbosity = 2): RE: Writing unit test results into a text file - Aspire2Inspire - Nov-15-2020 Maybe look at subprocess and some of the methods there, i know you can bring information into your code that way? Sorry i cant help any more RE: Writing unit test results into a text file - ateestructural - Nov-15-2020 No really sure what is wrong as ssame solution is given in few other forums. I'm using Eclipse IDE RE: Writing unit test results into a text file - ateestructural - Nov-15-2020 Any help will be gratefully appreciated. I ven tried the below code but the output is not written to the file/no file is created Quote:import unittest |