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
This is related to #191. tempfile imports os as _os and io as _io. With the current mechanism, these will not be patched by Patcher.
For this and other cases with custom modules it makes sense to have a possibility to add these to the patched names, for example by providing an additional dict to Patcher (and TestCase) that holds these names (e,g, something like {'tempfile': {'os': '_os', 'io': '_io'}}).
This could be pre-configured for tempfile, but have the possibility to add other modules.
The text was updated successfully, but these errors were encountered:
This is related to #191.
tempfile
importsos
as_os
andio
as_io
. With the current mechanism, these will not be patched byPatcher
.For this and other cases with custom modules it makes sense to have a possibility to add these to the patched names, for example by providing an additional dict to
Patcher
(andTestCase
) that holds these names (e,g, something like{'tempfile': {'os': '_os', 'io': '_io'}}
).This could be pre-configured for
tempfile
, but have the possibility to add other modules.The text was updated successfully, but these errors were encountered: