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

Method test_variable

Lib/test/test_tkinter/test_variables.py:348–356  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

346class DefaultRootTest(AbstractDefaultRootTest, unittest.TestCase):
347
348 def test_variable(self):
349 self.assertRaises(RuntimeError, Variable)
350 root = tkinter.Tk()
351 v = Variable()
352 v.set("value")
353 self.assertEqual(v.get(), "value")
354 root.destroy()
355 tkinter.NoDefaultRoot()
356 self.assertRaises(RuntimeError, Variable)
357
358
359if __name__ == "__main__":

Callers

nothing calls this directly

Calls 6

setMethod · 0.95
getMethod · 0.95
destroyMethod · 0.95
VariableClass · 0.90
assertRaisesMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected