MCPcopy Index your code
hub / github.com/RustPython/RustPython / assertRaisesTermiosError

Method assertRaisesTermiosError

Lib/test/test_termios.py:24–33  ·  view source on GitHub ↗
(self, err, callable, *args)

Source from the content-addressed store, hash-verified

22 self.bad_fd = tmp.fileno()
23
24 def assertRaisesTermiosError(self, err, callable, *args):
25 # Some versions of Android return EACCES when calling termios functions
26 # on a regular file.
27 errs = [err]
28 if sys.platform == 'android' and err == errno.ENOTTY:
29 errs.append(errno.EACCES)
30
31 with self.assertRaises(termios.error) as cm:
32 callable(*args)
33 self.assertIn(cm.exception.args[0], errs)
34
35 @unittest.expectedFailure # TODO: RUSTPYTHON; TypeError: Expected type 'int' but 'FileIO' found.
36 def test_tcgetattr(self):

Callers 8

test_tcgetattr_errorsMethod · 0.95
test_tcsetattr_errorsMethod · 0.95
test_tcdrain_errorsMethod · 0.95
test_tcflush_errorsMethod · 0.95
test_tcflow_errorsMethod · 0.95

Calls 4

callableFunction · 0.85
assertInMethod · 0.80
appendMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected