Message171505
| 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 |
<1348851126.27.0.943013617698.issue16079@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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_'. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年09月28日 16:52:06 | chris.jerdonek | set | recipients:
+ chris.jerdonek, ezio.melotti, eric.araujo, xdegaye |
| 2012年09月28日 16:52:06 | chris.jerdonek | set | messageid: <1348851126.27.0.943013617698.issue16079@psf.upfronthosting.co.za> |
| 2012年09月28日 16:52:06 | chris.jerdonek | link | issue16079 messages |
| 2012年09月28日 16:52:06 | chris.jerdonek | create |
|