I have the following contents in a file called test2.txt
.
>>> def faulty():
... yield 5
... return 7
Traceback(most recent call last):
SyntaxError: 'return' with argument inside generator(<doctest test.txt[0]>,line 3)
I invoke the test run with python -m test2.txt
. The results below are quite out of my expectation.
My thought was that the test should be successful because I have written the expected output in my test2.txt
file and it 'almost' matches what I got from the console output. I tried adding the 'File "G:\"'.... line
? but the test still failed.