FawltyDeps
FawltyDeps copied to clipboard
Make logging of the fawltydeps run testable without running in a subprocess
When refactoring tests from using subprocess runs of fawltydeps
to usage of main
function we encountered some trouble with testing logger messages. As pointed out by @Nour in https://github.com/tweag/FawltyDeps/pull/271#discussion_r1163327450 we should be able to use function runs of FawltyDeps the same way we use subprocess.
The contextlib function redirect_stderr did not work correctly in combination with pytest runs.
One idea is to refactor main
with explicit logger or at leas stderr
and capture data from there.