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
Add present, every module imports the config module. In turn the config module imports other modules, and then, runs code that imports the config file and changes local variables in the modules it imported. This makes testing more difficult as now most modules are dependant on the configuration file being loaded and tested correctly.
I propose that config should be held in a Config class which has sensible defaults and validates read values. With functions in the config module for reading and writing to file.
Add present, every module imports the config module. In turn the config module imports other modules, and then, runs code that imports the config file and changes local variables in the modules it imported. This makes testing more difficult as now most modules are dependant on the configuration file being loaded and tested correctly.
I propose that config should be held in a Config class which has sensible defaults and validates read values. With functions in the config module for reading and writing to file.
Something like
The Config class can then be imported and used in tests, but read from file and loaded at run time.
The text was updated successfully, but these errors were encountered: