uranusjr commented on PR #31712:
URL: https://github.com/apache/airflow/pull/31712#issuecomment-1588765592

   I was able to narrow down the problem. The culprit is 
`importlib.reload(baseoperator)`. This call makes the module to change 
identity, breaking `isinstance` checks. Using `reload` like this is generally a 
bad idea so I’d advice changing the test to e.g. patching the 
`DEFAULT_DEFERRABLE` constant instead of reloading the entire module. If you 
really want to test the config-reading part (not necessary IMO), it is better 
to temporary replace the entry in `sys.modules` (and restore after the test 
exits) instead. Just don’t use `reload`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to