This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author chris.jerdonek
Recipients chris.jerdonek, eric.araujo, ezio.melotti, xdegaye
Date 2012-09-28.16:52:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I would like to see this written in a way that would let one run it globally or on a single file independent of a patch (e.g. an independent script from which patchcheck could import certain functions).  Or is that what you explicitly didn't want Éric? :)

This would let one do a report or global check as was done for issue 16056.  It would also make it a bit easier to check manually that the script is checking for duplicates correctly.

Also, some suggestions:

+def testmethod_names(code, name=[]):

It might be clearer to use the name=None form.

+    test_files = [fn for fn in python_files if
+                  fn.startswith(os.path.join('Lib', 'test'))]

Are you getting the test files in test/ subdirectories of subpackages?  I think checking that the file name starts with "test_" might be sufficient to get all test files.

+    if name[-1].startswith('test_'):

I believe 'test' is the prefix that unittest uses.  I'm pretty sure we have some tests that don't start with 'test_'.
Date User Action Args
2012-09-28 16:52:06chris.jerdoneksetrecipients: + chris.jerdonek, ezio.melotti, eric.araujo, xdegaye
2012-09-28 16:52:06chris.jerdoneksetmessageid: <>
2012-09-28 16:52:06chris.jerdoneklinkissue16079 messages
2012-09-28 16:52:06chris.jerdonekcreate