-
Note: originally posted on StackOverFlow, and the answers would probably we welcome there. My pytest logs don't show what is happening during the execution of the failed (due to error) test.
The logging simply does not print the
Notably, this is the only test for the whole application yet, so my output is essentially What's wrong? Cheers. Edit: 15 minutes later, I'm trying to trigger errors manually: def integration_test():
assert False
raise Exception("How does this not fail?")
for i in range(100):
logging.error("LOGGING TEST")
#errors = tested_function() # this is not commented out
logging.info("this does not get printed") This computes exactly as it has before. How are my tests not changing the output even though the intent has completely changed? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Resolved: it was caused by a function which did this:
And the init function of the
I am using That's one weird issue... |
Beta Was this translation helpful? Give feedback.
Resolved: it was caused by a function which did this:
And the init function of the
SomeDatabase
is this:I am using
pyfakefs
, and it seems that the smart python compiler has instantiated and cached SomeDatabase before filesystem mocks went into place. So the mocks were not instantiated and the filesystem tried to used the "production" file which threw the error.That's one weird issue...