boilerplate likely to be needed for future test classes from test support import requires from tkinter import tk class testunittest testcase classmethod def setupclasscls requires gui cls root tk classmethod def teardownclasscls cls root destroy guiproxy idbadapter frameproxy codeproxy dictproxy guiadapter idbproxy and 7 functions still need tests boilerplate likely to be needed for future test classes from test support import requires from tkinter import tk class test unittest testcase classmethod def setupclass cls requires gui cls root tk classmethod def teardownclass cls cls root destroy guiproxy idbadapter frameproxy codeproxy dictproxy guiadapter idbproxy and 7 functions still need tests issue 33065
"Test debugger_r, coverage 30%."

from idlelib import debugger_r
import unittest

class IdbAdapterTest(unittest.TestCase):

    def test_dict_item_noattr(self):  

        class BinData:
            def __repr__(self):
                return self.length

        debugger_r.dicttable[0] = {'BinData': BinData()}
        idb = debugger_r.IdbAdapter(None)
        self.assertTrue(idb.dict_item(0, 'BinData'))
        debugger_r.dicttable.clear()


if __name__ == '__main__':
    unittest.main(verbosity=2)