8000 gh-110388: Add tests for tty by serhiy-storchaka · Pull Request #110394 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content
8000

gh-110388: Add tests for tty #110394

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

Merged
merged 4 commits into from
Oct 10, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Skip tests if /dev/tty is not available.
  • Loading branch information
serhiy-storchaka committed Oct 5, 2023
commit 80b3f21c38d2ac6b9bae22fb453453ac4d6104bf
5 changes: 4 additions & 1 deletion Lib/test/test_tty.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
class TestTty(unittest.TestCase):

def setUp(self):
self.stream = open('/dev/tty', 'wb', buffering=0)
try:
self.stream = open('/dev/tty', 'wb', buffering=0)
except OSError:
self.skipTest("Cannot open '/dev/tty'")
self.addCleanup(self.stream.close)
self.fd = self.stream.fileno()
self.mode = termios.tcgetattr(self.fd)
Expand Down
0