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

Method test_resets_termios

Lib/test/test_getpass.py:114–124  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

112 textio.assert_called_once_with(fileio.return_value)
113
114 def test_resets_termios(self):
115 with mock.patch('os.open') as open, \
116 mock.patch('io.FileIO'), \
117 mock.patch('io.TextIOWrapper'), \
118 mock.patch('termios.tcgetattr') as tcgetattr, \
119 mock.patch('termios.tcsetattr') as tcsetattr:
120 open.return_value = 3
121 fake_attrs = [255, 255, 255, 255, 255]
122 tcgetattr.return_value = list(fake_attrs)
123 getpass.unix_getpass()
124 tcsetattr.assert_called_with(3, mock.ANY, fake_attrs)
125
126 def test_falls_back_to_fallback_if_termios_raises(self):
127 with mock.patch('os.open') as open, \

Callers

nothing calls this directly

Calls 2

listClass · 0.85
assert_called_withMethod · 0.80

Tested by

no test coverage detected