R. Jayakrishnan added the comment:
I wrapped requires('gui') as submitted in patch2. But this time commands
"python -m test test_idle" and with -ugui does not skip delegatortest (it runs
successfully to both).
I took Lib/test/test_tk.py as an example.
It calls runtktests.get_tests using support.run_unittest from test module.
Exploring Lib/tkinter/test/runtktests.py the get_tests method begins like
....
def get_tests(text=True, gui=True, packages=None):
"""Yield all the tests in the modules found by get_tests_modules.
If nogui is True, only tests that do not require a GUI will be
returned."""
attrs = []
if text:
attrs.append('tests_nogui')
if gui:
attrs.append('tests_gui')
....
....
also notice the main method calles "test.support.use_resources = ['gui']"
Now the tktests have the line * require('gui') * before the class bigins, for
example have a look on test_textensions.py
So do we have to come up with the same procedure to skip and play with gui and
non-gui tests for IDLE ? correct me if I am wrong anywhere.
----------
Added file: http://bugs.python.org/file30691/test_delegator2.patch
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue18189>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com