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'm using the Quilt API in my own code and have found testing package logic to be a challenge without polluting my default local registry. The problem comes from the fact that the default config locations are set as global variables in util.py even though they do respect platform specific envars, such as XDG_*. Thus, during testing, you can't override the registry location and/or config files for individual tests without mocking in several different places or restarting the interpreter.
One way to improve the API would be to create a Config type that could be passed to dependent types, e.g., Package. These in turn could by default use a predefined global Config object that uses the paths as currently defined, but could be overridden when necessary.
The text was updated successfully, but these errors were encountered:
I'm using the Quilt API in my own code and have found testing package logic to be a challenge without polluting my default local registry. The problem comes from the fact that the default config locations are set as global variables in util.py even though they do respect platform specific envars, such as
XDG_*
. Thus, during testing, you can't override the registry location and/or config files for individual tests without mocking in several different places or restarting the interpreter.One way to improve the API would be to create a
Config
type that could be passed to dependent types, e.g.,Package
. These in turn could by default use a predefined globalConfig
object that uses the paths as currently defined, but could be overridden when necessary.The text was updated successfully, but these errors were encountered: