mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
Issue #20635: Added tests for Tk geometry managers.
This commit is contained in:
parent
a39938ff44
commit
e544f9a27e
3 changed files with 915 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue