This repository has been archived by the owner on Nov 14, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Python tests: skip the session hooks if --collect-only is used (cvat-…
…ai#5550) Turns out that cvat-ai#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.
- Loading branch information