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

Method test_sync_source_line

Lib/idlelib/idle_test/test_debugger.py:159–168  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

157 mock.call('test2.py', 45)])
158
159 def test_sync_source_line(self):
160 # Test that .sync_source_line() will set the flist.gotofileline with fixed frame.
161 test_code = compile(TEST_CODE, 'test_sync.py', 'exec')
162 test_frame = MockFrame(test_code, 1)
163 self.debugger.frame = test_frame
164
165 self.debugger.flist = Mock()
166 with patch('idlelib.debugger.os.path.exists', return_value=True):
167 self.debugger.sync_source_line()
168 self.debugger.flist.gotofileline.assert_called_once_with('test_sync.py', 1)
169
170
171class DebuggerGuiTest(unittest.TestCase):

Callers

nothing calls this directly

Calls 6

MockClass · 0.90
patchFunction · 0.90
MockFrameClass · 0.85
sync_source_lineMethod · 0.80
compileFunction · 0.50

Tested by

no test coverage detected