seallard / walker

NEAT
MIT License
0 stars 0 forks source link

Passing around constant settings #30

Closed seallard closed 3 years ago

seallard commented 3 years ago

The code becomes unnecessarily messy when settings are passed around as arguments.

seallard commented 3 years ago

Parsing a config file might be better. However, the testing becomes more cumbersome since I would have to create configs for different tests.

seallard commented 3 years ago

Maybe I should have a single configuration object that I pass around?

seallard commented 3 years ago

https://stackoverflow.com/questions/21527610/pythonic-way-to-pass-around-many-arguments

seallard commented 3 years ago

https://refactoring.guru/smells/long-parameter-list

seallard commented 3 years ago

https://stackoverflow.com/questions/168931/unit-testing-the-app-config-file-with-nunit

seallard commented 3 years ago

The best way seems to be a single config object. The tests can use a mock config object.