Terry J. Reedy added the comment:
The test_delegator patches were useful for working out and testing the use of
the gui resource.
However, they are not appropriate for testing the Delegator class. It is a
standalone class that has nothing to do with tkinter; in fact, the file has no
imports.
Roundup Robot added the comment:
New changeset a568a5426a16 by Terry Jan Reedy in branch '2.7':
Issue 18189: remove unused methods in idlelib.Delegator.Delegator.
http://hg.python.org/cpython/rev/a568a5426a16
New changeset 9d65716367c1 by Terry Jan Reedy in branch '3.3':
Issue 18189: remove
Terry J. Reedy added the comment:
I asked on the core-mentorship list about pydev test philosophy. I got useful
answers from Nick and Antoine that can be summarized as We are pragmatic, not
dogmatic. One may have to be a list member to read this link, but here it is.
Roundup Robot added the comment:
New changeset 231c122b44b6 by Terry Jan Reedy in branch '2.7':
Issue #18189: add test_delegator for Idle Delegator class.
http://hg.python.org/cpython/rev/231c122b44b6
New changeset c7605471e8ae by Terry Jan Reedy in branch '3.3':
Issue #18189: add
Changes by Terry J. Reedy tjre...@udel.edu:
--
resolution: - fixed
stage: needs patch - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18189
___
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
Terry J. Reedy added the comment:
test.support.requires returns True if
called from a context with __name__ = '__main__' or
'gui' in test.support.use_resources.
The first clause is never true for buildbots, so the presumption is that the
test was invoked by a user with a gui screen. (Windoes
R. Jayakrishnan added the comment:
The from test.resource import requires give me errors saying no module named
resource in test (Am I missing anything?)
For the moment I use from test.support import requires as in
test_delegator1.patch
.
from test.support import requires
requires('gui')
Changes by R. Jayakrishnan raaj...@gmail.com:
Removed file: http://bugs.python.org/file30626/test_delegator1.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18189
___
Changes by R. Jayakrishnan raaj...@gmail.com:
Added file: http://bugs.python.org/file30627/test_delegator1.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18189
___
Terry J. Reedy added the comment:
Yes, 'support', not 'resource'. However, re-read my message for properly using
requires to avoid the traceback.
def setUpModule():
requires('gui')
may also work, but I am assuming that there might be non-gui test cases added
later.
--
Terry J. Reedy added the comment:
As I discovered by experiment, unittest.SkipTest and subclasses are only
handled properly inside of functions recognized and called by unittest. This
could be better documented.
--
___
Python tracker
Changes by R. Jayakrishnan raaj...@gmail.com:
--
nosy: +ncoghlan
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18189
___
___
Python-bugs-list
Terry J. Reedy added the comment:
The format looks good.
The content looks skimpy. I am not familiar with Delegator and have not yet
looked to see what more is needed. But this is enough to test working with a
gui test.
This *is* a gui test. See msg190576. So it must be protected by
New submission from R. Jayakrishnan:
Continuing the IDLE unittest framework initiated in
http://bugs.python.org/issue15392.
A small unit test for IDLE Delegator.py module. This patch introduces a test
module named test_delegator.py inside Lib/idlelib/idle_test, considering the
points README
Changes by R. Jayakrishnan raaj...@gmail.com:
--
versions: +Python 2.7, Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18189
___
___
Changes by Todd Rovito rovit...@gmail.com:
--
nosy: +Todd.Rovito
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18189
___
___
Python-bugs-list
Changes by Todd Rovito rovit...@gmail.com:
--
nosy: +philwebster
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18189
___
___
Python-bugs-list
Changes by Todd Rovito rovit...@gmail.com:
--
nosy: +terry.reedy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18189
___
___
Python-bugs-list
19 matches
Mail list logo