Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not display failure messages when the pytest is interrupted #94

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions pytest_watch/watcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
from watchdog.observers.polling import PollingObserver

from .constants import (
ALL_EXTENSIONS, EXIT_NOTESTSCOLLECTED, EXIT_OK, DEFAULT_EXTENSIONS)
ALL_EXTENSIONS, EXIT_INTERRUPTED, EXIT_NOTESTSCOLLECTED, EXIT_OK,
DEFAULT_EXTENSIONS)
from .helpers import (
beep, clear, dequeue_all, is_windows, samepath, send_keyboard_interrupt)

Expand Down Expand Up @@ -297,7 +298,7 @@ def watch(entries=[], ignore=[], extensions=[], beep_on_failure=True,
# Run dependent commands
if exit_code in [EXIT_OK, EXIT_NOTESTSCOLLECTED]:
run_hook(onpass)
else:
elif exit_code != EXIT_INTERRUPTED:
if beep_on_failure:
beep()
run_hook(onfail)
Expand Down