Conversation
| } | ||
| })) | ||
| assert handle_config[notify.DOMAIN] | ||
| ), patch('homeassistant.components.notify.file.os.stat') as mock_st, \ |
There was a problem hiding this comment.
mocking os.stat while imports were being done was messing with the tests.
|
Some problems are only vissible in real world scenario :) But code have looking okay before and now it is better. |
|
Why didn't the new logic work? |
|
The first cleanup looks amazing, but with last modification it going into direction to become the label "uggly". The old was a bit cleaner at this part. The last PR they fix the naming problem, was hard on limit for a core PR. I approved the last one because some times it need tests on real world and the code/idea need some grow time until he is perfect. |
|
@MartinHjelmare the problem was that we didn't provide a "full" Python import environment by importing the files directly. That means that things like The right solution would be to be able to mount a folder in the Python search path but only be able to whitelist 1 subfolder as being allowed to import from. |
* Revert custom component loading logic * Lint * Fix tests * Guard for infinite inserts into sys.path
Description:
Revert the loading logic refactor for custom components introduced in #14211. Keeping the cleanup 👍
Added some tests to make sure that future refactors are aware of certain functionality that will break.
Checklist:
tox. Your PR cannot be merged unless tests passIf the code does not interact with devices: