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
I've tried to run my test in debug mode with a break point where the error occurs. If I run Registry.get then it fails as in the test but if I run Registry.get() a second time then it works.
Reason
In Registry.get() we only look for the specific name, i.e. from_entry_point = self.get_entry_point(name) or in the global variable REGISTRY. It doesn't exist in either in the first run. But in the second run it does exist in REGISTRY since we called Registry.get_entry_points() to print the error message, since this method actually load all the modules in the entry points and thereby populates REGISTRY.
Proposed solution
Load all modules from entry points in Registry.get() if there is entry points but the requested one is found directly.
The text was updated successfully, but these errors were encountered:
NixBiks
changed the title
Odd behavior with entry points when running my tests with pytest
Can't get functions from registry if entry points only points to the correct module and not to the specific functions
Feb 18, 2021
Are you still running into issues related to this? We haven't had any other related reports and without any tests, I'm a little hesitant about the changes in #13.
I'm getting this extremely odd error that tells me
chain.v1
is not available while it is showing up as available name at the same time.I've tried to run my test in debug mode with a break point where the error occurs. If I run
Registry.get
then it fails as in the test but if I runRegistry.get()
a second time then it works.Reason
In
Registry.get()
we only look for the specific name, i.e.from_entry_point = self.get_entry_point(name)
or in the global variableREGISTRY
. It doesn't exist in either in the first run. But in the second run it does exist inREGISTRY
since we calledRegistry.get_entry_points()
to print the error message, since this method actually load all the modules in the entry points and thereby populatesREGISTRY
.Proposed solution
Load all modules from entry points in
Registry.get()
if there is entry points but the requested one is found directly.The text was updated successfully, but these errors were encountered: