You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using runpy's run_module function inside a pytest test and pointing to the very module of the test being run the execution will crash reporting AttributeError: 'AssertionRewritingHook' object has no attribute 'get_code'.
Calling an external function from other file in the test which calls runpy::run_module using the test's module as parameter will still yield the same error.
Calling runpy::run_module passing any module other than the test's very own module will yield no error.
Using runpy::run_path instead of run_module, passing the test's very own file path, will yield no error.