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
Suggestions for refactoring the cellfinder workflow tests, from the PR #23 review (thanks @alessandrofelder!)
Can we redefine the integration tests as parametrised instead, considering a range of input configs (default, fetching from GIN, fetching locally)?
Split the current integration tests into unit tests, each testing the individual steps (e.g., split setup into the 4 setup steps, and then test the actual workflow separately). This would allow us to remove the subprocess call and we think it would simplify the whole suite.
I would then use pytest's fixture caplog / capsys to assert logs
Make the tests more modular.
Separate general unit tests (parser for now) and cellfinder-specific unit tests (with modules / directories)
Start a utils module for all workflows (which for now would include the parser function)
(unit) test this separately
Do we need the make_config helper functions?
if we are doing away with the subprocess call, probably no. Instead, have a fixture that returns the config as a CellfinderConfig class instead.
if we do need them, can we make them smaller? can they be defined inside the relevant fixtures instead?
Integrate fixtures back into file with the tests' definitions, rather than in conftest.py
Remove autouse=True for cellfinder_cache_dir fixture: this is because autouse=True will automatically execute the fixture for every test, and we won't want e.g. brainreg tests to trigger this fixture. (Can we have autouse only at module level?)
The text was updated successfully, but these errors were encountered:
Suggestions for refactoring the cellfinder workflow tests, from the PR #23 review (thanks @alessandrofelder!)
setup
into the 4 setup steps, and then test the actual workflow separately). This would allow us to remove thesubprocess
call and we think it would simplify the whole suite.make_config
helper functions?subprocess
call, probably no. Instead, have a fixture that returns the config as aCellfinderConfig
class instead.autouse=True
forcellfinder_cache_dir
fixture: this is becauseautouse=True
will automatically execute the fixture for every test, and we won't want e.g. brainreg tests to trigger this fixture. (Can we have autouse only at module level?)The text was updated successfully, but these errors were encountered: