Re: Non-buildbot human mediated tests
Saimadhav Heblikar <[email protected]>
| Newsgroups | gmane.comp.python.idle |
|---|---|
| Message-ID | <CAO3PiBiXr-VXp8F=B-hg9cr+yxiR5jreTORS_UFCOCVDzspCJw@mail.gmail.com> |
Hi, I was going through the htest.py commit. 1. The line klas_kwds['parent'] = root (line 69) and the related comment " # This presumes that Idle consistently uses 'parent'", could cause certain problems with widgets not directly requiring a 'parent' argument.(From my recall, these include PathBrowser and ClassBrowser). One way to solve would be to move root to a namespace one level higher and include the 'parent' arg as any you would include any other arg. We will also get a Tk() object in the same namespace as the spec dicts.(For eg - Useful in context of ClassBrowser which requires root to create a PyshellFileList) This will make certain aspects easier and more readable. This approach worked when I tested it against ClassBrowser and the existing aboutDialog. Another way is to include metadata in "<classname>_spec" dict to indicate whether 'parent' is needed or not. This i feel is clumsy and could make code in run() spaghetti. I personally prefer the first way. Regards Saimadhav Heblikar