Message171505
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: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 | |
|