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

Method test_get

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

Source from the content-addressed store, hash-verified

303 self.assertIs(v.get(), False)
304
305 def test_get(self):
306 v = BooleanVar(self.root, True, "name")
307 self.assertIs(v.get(), True)
308 self.root.globalsetvar("name", "0")
309 self.assertIs(v.get(), False)
310 self.root.globalsetvar("name", 42 if self.root.wantobjects() else 1)
311 self.assertIs(v.get(), True)
312 self.root.globalsetvar("name", 0)
313 self.assertIs(v.get(), False)
314 self.root.globalsetvar("name", "on")
315 self.assertIs(v.get(), True)
316
317 def test_set(self):
318 true = 1 if self.root.wantobjects() else "1"

Callers

nothing calls this directly

Calls 4

getMethod · 0.95
BooleanVarClass · 0.90
wantobjectsMethod · 0.80
assertIsMethod · 0.45

Tested by

no test coverage detected