Python tests: skip the session hooks if --collect-only is used (#5550)
Turns out that #5456 had a nasty side effect. Session hooks are called when pytest is run with `--collect-only` (even though no tests are actually run in this case), and Visual Studio Code periodically runs `pytest --collect-only` in order to learn what tests exist in the project. As a result, it keeps restarting the services and restoring the database in the background. Work around this by skipping all logic in the hooks if `--collect-only` is in the options.main
parent
1071e2379c
commit
0ea14d23a8
Loading…
Reference in New Issue