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

Method test_null_in_name

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

Source from the content-addressed store, hash-verified

95 Variable(self.root, name=123)
96
97 def test_null_in_name(self):
98 with self.assertRaises(ValueError):
99 Variable(self.root, name='var\x00name')
100 with self.assertRaises(ValueError):
101 self.root.globalsetvar('var\x00name', "value")
102 with self.assertRaises(ValueError):
103 self.root.globalsetvar(b'var\x00name', "value")
104 with self.assertRaises(ValueError):
105 self.root.setvar('var\x00name', "value")
106 with self.assertRaises(ValueError):
107 self.root.setvar(b'var\x00name', "value")
108
109 def test_initialize(self):
110 v = Var(self.root)

Callers

nothing calls this directly

Calls 3

VariableClass · 0.90
assertRaisesMethod · 0.45
setvarMethod · 0.45

Tested by

no test coverage detected