Issue #20635: Added tests for Tk geometry managers.

This commit is contained in:
Serhiy Storchaka 2014-04-13 19:52:23 +03:00
parent a39938ff44
commit e544f9a27e
3 changed files with 915 additions and 0 deletions

View file

@ -33,6 +33,17 @@ class AbstractWidgetTest:
if not self.root.wantobjects():
self.wantobjects = False
def tearDown(self):
for w in self.root.winfo_children():
w.destroy()
def _str(self, value):
if self.wantobjects and tcl_version >= (8, 6):
return value
if isinstance(value, tuple):
return ' '.join(map(self._str, value))
return str(value)
def create(self, **kwargs):
widget = self._create(**kwargs)
self.addCleanup(widget.destroy)