Brett Cannon added the comment:
Why remove the refleak tests? I'm sure Raymond put those in for a reason as I
know he tries to reuse various objects a lot and this helped make sure he
didn't mess anything up.
I don't think the tests need to be backported.
--
Ezio Melotti added the comment:
Why remove the refleak tests?
Because regrtest already provides the feature, so I don't see a reason to
duplicate it here. FWIW the same code is copy/pasted elsewhere too, e.g. in
Lib/test/test_operator.py:438.
--
Brett Cannon added the comment:
The patch LGTM
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16748
___
___
Python-bugs-list mailing list
Roundup Robot added the comment:
New changeset 008bac4e181c by Ezio Melotti in branch '3.3':
#16748: test_heapq now works with unittest test discovery.
http://hg.python.org/cpython/rev/008bac4e181c
New changeset de6bac0a40cc by Ezio Melotti in branch 'default':
#16748: merge with 3.3.
Ezio Melotti added the comment:
Fixed, thanks for the review!
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
versions: -Python 2.7, Python 3.2
___
Python tracker rep...@bugs.python.org
Serhiy Storchaka added the comment:
As I mentioned above, not only test_heapq uses this idiom, but a lot of other
tests. Try to fix hard cases first: test_genericpath and test_functools.
--
status: closed - open
___
Python tracker
Ezio Melotti added the comment:
I just came across the problem described here while reviewing #16694.
The idiom I used for the JSON tests[0] (and possibly a couple of other tests)
when I rewrote them was to have something like:
class FooTest:
# all the test methods here
class
Brett Cannon added the comment:
I created http://bugs.python.org/issue16835 to remind me to update PEP 399.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16748
___
Ezio Melotti added the comment:
Attached patch fixes Lib/test/test_heapq.py.
I also replaced the test_main() with unittest.main() and got rid of the code
previously used to test reference leaks. As it is the patch can be applied
on 3.3/default. If you think it should be backported to 2.7/3.2
Brett Cannon added the comment:
Making tests discoverable allows for the future possibility of dropping our
custom test runner code and using more of unittest code by having regrtest use
unittest's discovery code to find all tests.
--
___
Python
Terry J. Reedy added the comment:
I should think that the first fix should be to the PEP. If I understand
msg177908, that would mean removing unittest.TestCase as a base for ExampleTest
and adding it as bases for AcceleratedExampleTest and PyExampleTest. Or have I
missed something?
R. David Murray added the comment:
That sounds right to me.
Note that PEP 399 is following older conventions that were laid down in a time
when unittest did not *have* test discovery, so this is a new paradigm we'd
like to move to (for the reasons Brett mentioned), and it may take a while to
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +ezio.melotti
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16748
___
___
Stefan Krah added the comment:
Perhaps I misunderstood something, but test_decimal.py *is* using the
exact idiom from PEP-399 and it works. Why do you want to fix the
usage of this idiom?
--
nosy: +skrah
___
Python tracker rep...@bugs.python.org
Stefan Krah added the comment:
I finally understood the issue. So this does not work:
./python -m unittest discover Lib/test/ 'test_dec*.py'
Neither does this:
./python -m unittest discover Lib/test/ 'test_multipro*.py'
And this fails, too (still hanging):
./python -m unittest
Éric Araujo added the comment:
I won’t be online for the next two weeks.
I think there is a bug with Michael Foord, RDM and I where we talk about this
very issue.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16748
Serhiy Storchaka added the comment:
No need to add this trivial class to test.support. Mixin can have different
parameters in additional to 'module' (see 16659).
I found a lot of usages of this idiom in tests and some of them can't be
changed so simple (for example test_genericpath and
Serhiy Storchaka added the comment:
Éric, can you submit a test which exposes the problem?
--
stage: - test needed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16748
___
New submission from Zachary Ware:
As pointed out by Éric Araujo in msg177908 of issue16694, tests using the idiom
presented in PEP 399 are subject to breakage of test discovery. This issue's
goal is to root out and fix all usages of this idiom.
So far, only test_heapq is known to be
Changes by Brett Cannon br...@python.org:
--
nosy: +brett.cannon
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16748
___
___
Python-bugs-list
20 matches
Mail list logo