[issue17464] Improve Test Coverage Of Pydoc

2013-03-18 Thread Matt Bachmann

Changes by Matt Bachmann bachmann.m...@gmail.com:


--
components: +Tests
type:  - enhancement

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17464
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17464] Improve Test Coverage Of Pydoc

2013-03-18 Thread Matt Bachmann

New submission from Matt Bachmann:

Adds some test coverage to pydoc.

--
files: pydoctests.patch
keywords: patch
messages: 184486
nosy: Matt.Bachmann
priority: normal
severity: normal
status: open
title: Improve Test Coverage Of Pydoc
versions: Python 3.5
Added file: http://bugs.python.org/file29448/pydoctests.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17464
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17464] Improve Test Coverage Of Pydoc

2013-03-18 Thread Radu Voicilas

Radu Voicilas added the comment:

Hi,

Here are some small comments to your otherwise good to have patch:

-- assertEquals has been deprecated in favor of assertEqual, and usually it's 
great to be consistent across the test suite
-- likewise maxDiff should be max_diff mainly because of consistency and 
because of pep8's naming styles
-- self.temp_dir is never cleaned up (on tearDown maybe?) and gettempdir() 
doesn't really look like a good option; maybe you wanted to create a new 
temporary directory rather than pointing to the filesystem's tmp dir ?
-- the patch doesn't apply cleanly, at least for me - the ACKS hunk is failing 
for me

--
nosy: +raduv

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17464
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17464] Improve Test Coverage Of Pydoc

2013-03-18 Thread Matt Bachmann

Matt Bachmann added the comment:

Sure thing, ill make the improvements and upload a new patch. Thanks!

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17464
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17464] Improve Test Coverage Of Pydoc

2013-03-18 Thread Matt Bachmann

Matt Bachmann added the comment:

--Changes assertequals to assertequal
--Removes maxdiff as it should not really be there in the first place
--Creates an explicit testdir, and cleans it up
--Last patch did not actually apply cleanly... I reverted and applied this one 
and this seems to work

--
Added file: http://bugs.python.org/file29452/pydoc_tests_v2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17464
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17464] Improve Test Coverage Of Pydoc

2013-03-18 Thread R. David Murray

R. David Murray added the comment:

Thanks for the patch.

Rather than create and destroy a directory for every test (setUp/tearDown), it 
is possible to use the test.support.temp_cwd context manager to create and 
destroy one inside the single tests that need it.

A nit: we prefer to keep the line length to 80 (that is, max 79).

In test_getting_all_methods_from_class, why is 'method_returning_true' not in 
the list?  I also worry that this test is a bit fragile, but I don't have a 
good suggestion for how to fix that, so we'll probably just have to live with 
it.

--
nosy: +r.david.murray

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17464
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17464] Improve Test Coverage Of Pydoc

2013-03-18 Thread Matt Bachmann

Matt Bachmann added the comment:

Thanks for the feedback :-D

Changes:

Utilize test.support.temp_cwd()
Removed imports that this made unnecessary
 Awesome trick!

Cut line length down. Don't worry about nitpicking. Anything to get this to be 
as good as possible.

I added an explanation to the test class explaining why 
test_getting_all_methods_from_class does not appear. I also agree this is 
fragile. I have an idea for how to fix this and will upload it as a separate 
patch (in this thread) because I am not sure what people will think.

--
Added file: http://bugs.python.org/file29470/pydoc_tests_v3.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17464
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17464] Improve Test Coverage Of Pydoc

2013-03-18 Thread Matt Bachmann

Matt Bachmann added the comment:

Eh, sorry... I tried to do a less fragile way of generating the configuration 
dict. Tried a few things but it very quickly got messy and even worse started 
to smell like testing the method with... the method being tested.

I am open to ideas though.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17464
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17464] Improve Test Coverage Of Pydoc

2013-03-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 474f078ec958 by R David Murray in branch 'default':
#17464: improve pydoc test coverage.
http://hg.python.org/cpython/rev/474f078ec958

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17464
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17464] Improve Test Coverage Of Pydoc

2013-03-18 Thread R. David Murray

R. David Murray added the comment:

As discussed with Matt, I deleted the allmethods tests, since the current 
behavior is actually a bug.  pydoc itself doesn't use allmethods, but I did 
find that numpy at least does so.  A separate issue will be opened for that bug.

--
resolution:  - fixed
stage:  - committed/rejected
status: open - closed
versions: +Python 3.4 -Python 3.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17464
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com