(self)
| 266 | self.assertEqual(self.sv.get(1), '?.<module>(), line 2: ') |
| 267 | |
| 268 | def test_show_source(self): |
| 269 | # Test the .show_source() method against a fixed test stack. |
| 270 | # Patch out the file list to monitor it |
| 271 | self.sv.flist = Mock() |
| 272 | # Patch out isfile to pretend file exists. |
| 273 | with patch('idlelib.debugger.os.path.isfile', return_value=True) as isfile: |
| 274 | self.sv.show_source(1) |
| 275 | isfile.assert_called_once_with('test_stackviewer.py') |
| 276 | self.sv.flist.open.assert_called_once_with('test_stackviewer.py') |
| 277 | |
| 278 | |
| 279 | class NameSpaceTest(unittest.TestCase): |
nothing calls this directly
no test coverage detected