Closed nMustaki closed 8 years ago
I like it! This looks like a great feature.
A few issues:
cli-options.txt
is regenerated for each release by capturing the actual --help
output, so the manual changes there are redundant. It doesn't hurt anything that you manually updated it, of course.Once there are at least some tests that cover it, I'd be happy to merge.
Great you like the idea ! I can only think of one test to add, so I'd glad to have your input on what's missing
def test_printErrorsStdoutQuietStdout(self):
"""
printErrors() prints out the captured stdout
except when quiet_stdout is set to True
"""
self.args.quiet_stdout = True
gtr = GreenTestResult(self.args, GreenStream(self.stream))
pt = MyProtoTest()
output = 'this is what the test should not spit out to stdout'
gtr.recordStdout(pt, output)
gtr.addSuccess(pt)
gtr.printErrors()
self.assertNotIn(output, self.stream.getvalue())
It's in 2.3.0
, which was just released!
Great!
I am testing a Flask application which is very verbose, and I only need the added output if the test fail. So this option should only display stdout/stderr if the test is not successful. I am not sure about the best way to integrate this with your current tests can you help me on that ? Thanks !