From 93dec6ceef5dde808679cb33b7c0ab7935960b6d Mon Sep 17 00:00:00 2001 From: olzhasar Date: Tue, 6 Feb 2024 21:54:59 +0800 Subject: [PATCH] Fix termios, tty import issue on Windows --- pytest_watcher/terminal.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pytest_watcher/terminal.py b/pytest_watcher/terminal.py index 47d5985..27ecd1e 100644 --- a/pytest_watcher/terminal.py +++ b/pytest_watcher/terminal.py @@ -3,10 +3,14 @@ import os import select import sys -import termios -import tty from typing import List, Optional +try: + import termios + import tty +except ImportError: + pass + class Terminal(abc.ABC): def clear(self):