| 1 |
"Test debugger_r, coverage 30%." |
| 2 |
|
| 3 |
from idlelib import debugger_r |
| 4 |
import unittest |
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
class IdbAdapterTest(unittest.TestCase): |
| 22 |
|
| 23 |
def test_dict_item_noattr(self): |
| 24 |
|
| 25 |
class BinData: |
| 26 |
def __repr__(self): |
| 27 |
return self.length |
| 28 |
|
| 29 |
debugger_r.dicttable[0] = {'BinData': BinData()} |
| 30 |
idb = debugger_r.IdbAdapter(None) |
| 31 |
self.assertTrue(idb.dict_item(0, 'BinData')) |
| 32 |
debugger_r.dicttable.clear() |
| 33 |
|
| 34 |
|
| 35 |
if __name__ == '__main__': |
| 36 |
unittest.main(verbosity=2) |