summaryrefslogtreecommitdiff
path: root/Lib/lib-tk/test/test_ttk/test_functions.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/lib-tk/test/test_ttk/test_functions.py')
-rw-r--r--Lib/lib-tk/test/test_ttk/test_functions.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/lib-tk/test/test_ttk/test_functions.py b/Lib/lib-tk/test/test_ttk/test_functions.py
index b8f08a5bfc..39e1dec14e 100644
--- a/Lib/lib-tk/test/test_ttk/test_functions.py
+++ b/Lib/lib-tk/test/test_ttk/test_functions.py
@@ -394,8 +394,10 @@ class InternalFunctionsTest(unittest.TestCase):
('name', 'no_minus', 'value'))
self.assertRaises(ValueError, ttk._list_from_layouttuple,
('something', '-children')) # no children
- self.assertRaises(ValueError, ttk._list_from_layouttuple,
- ('something', '-children', 'value')) # invalid children
+ import Tkinter
+ if not Tkinter._default_root or Tkinter._default_root.wantobjects():
+ self.assertRaises(ValueError, ttk._list_from_layouttuple,
+ ('something', '-children', 'value')) # invalid children
def test_val_or_dict(self):