MCPcopy Index your code
hub / github.com/python/cpython / test_init

Method test_init

Lib/test/test_curses.py:1371–1380  ·  view source on GitHub ↗

Test textbox initialization.

(self)

Source from the content-addressed store, hash-verified

1369 self.textbox = curses.textpad.Textbox(self.mock_win)
1370
1371 def test_init(self):
1372 """Test textbox initialization."""
1373 self.mock_win.reset_mock()
1374 tb = curses.textpad.Textbox(self.mock_win)
1375 self.mock_win.getmaxyx.assert_called_once_with()
1376 self.mock_win.keypad.assert_called_once_with(1)
1377 self.assertEqual(tb.insert_mode, False)
1378 self.assertEqual(tb.stripspaces, 1)
1379 self.assertIsNone(tb.lastcmd)
1380 self.mock_win.reset_mock()
1381
1382 def test_insert(self):
1383 """Test inserting a printable character."""

Callers

nothing calls this directly

Calls 4

assertIsNoneMethod · 0.80
reset_mockMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected