Roundup Robot added the comment:
New changeset f598d0014d07 by Zachary Ware in branch '3.4':
Issue #16000: Convert test_curses to use unittest
https://hg.python.org/cpython/rev/f598d0014d07
New changeset b7b49f26a87b by Zachary Ware in branch 'default':
Issue #16000: Convert test_curses to use
Changes by Zachary Ware zachary.w...@gmail.com:
--
assignee: - zach.ware
resolution: - fixed
stage: patch review - resolved
status: open - closed
versions: +Python 3.5 -Python 3.3
___
Python tracker rep...@bugs.python.org
Zachary Ware added the comment:
It's only taken me 6 months, but I'm looking at this issue again :)
Ed, basically the only reason I used setUpModule was because it was a very
direct translation from test_main to setUpModule--only the name and signature
changed, the skip and initialization
Ed Campbell added the comment:
I think this is a real improvement. Thanks. I have a few comments:
I suspect you know this, but the rendering problem occurs because of the call
to curses.endwin() in tearDown(). I experimented with delaying this until
teadDownClass() but this led to even more
Zachary Ware added the comment:
I had a chance to look at this today and took a stab at writing a patch
(attached). Since moving all of the test functions into a TestCase subclass
necessarily means indenting everything another level, the patch is a huge ugly
mix of - and + lines that don't
Changes by Zachary Ware zachary.w...@gmail.com:
Added file: http://bugs.python.org/file30729/issue16000.v1-cmp.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16000
___
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +zach.ware
versions: +Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16000
___
Ed Campbell added the comment:
I'd suggest using unittest.TestCase.assertRaises() as a context manager to
remove some try-excepts. For example I think function
test_userptr_without_set() on line 245 could use:
with self.assertRaises(curses.panel.error):
p.userptr()
I could create a patch
Chris Jerdonek added the comment:
Ed, yes, switching all of test_curses to using unittest patterns is the
eventual goal of this issue, though this may be done in more than one stage.
As I said in my previous comment, I limited the first patch to focusing on the
proper setUp(), tearDown(),
Chris Jerdonek added the comment:
Ed, yes, switching all of test_curses to using unittest patterns is the
eventual goal of this issue, though this may be done in more than one stage.
As I said in my previous comment, I limited the first patch to focus on the
proper setUp(), tearDown(), etc
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +ezio.melotti
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16000
___
___
New submission from Chris Jerdonek:
This issue is to switch test_curses to using unittest.TestCase classes.
Currently, test_curses does not use unittest.TestCase. It just calls a series
of functions that exercise curses functionality and aborts if an exception
occurs:
STINNER Victor added the comment:
Would like to work on such patch?
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16000
___
___
Chris Jerdonek added the comment:
Sure, I could start work on such a patch. I may start by switching just a
couple of the functions to TestCase though (to establish a model and to make
sure everything is wired up correctly), rather than attempting to switch the
entire module all at once.
Chris Jerdonek added the comment:
Here is an initial patch for discussion. As I started to say in my previous
comment, I think it would be worth settling on the wiring (e.g.
setUp/tearDown/etc) before trying to do more.
Some comments on the current patch:
(1) Of the following methods, it's
15 matches
Mail list logo