Message191537
| Author |
zach.ware |
| Recipients |
brett.cannon, ezio.melotti, zach.ware |
| Date |
2013年06月20日.20:30:19 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1371760220.13.0.623339240586.issue18273@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Technically, test discovery already works for test_json.py / json_tests, but not the way really expected (each test file is discovered individually), and not as simply as it could. The attached patch does the following:
- remove test_json.py
- rename json_tests to test_json (to match all other tests, following the example of test_email and test_importlib)
- remove main() and 'if __name__ == "__main__"' stanza from __init__.py
- rename test_suite() to load_tests(*args)
- Add test_json/__main__.py, which calls unittest.main
I believe this is the simplest, cleanest way to convert the json tests from test_main to unittest.main().
The patch is against 3.3; there are changes in 3.4 that make a patch against it not apply to 3.3. It merges forward easily, though. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2013年06月20日 20:30:20 | zach.ware | set | recipients:
+ zach.ware, brett.cannon, ezio.melotti |
| 2013年06月20日 20:30:20 | zach.ware | set | messageid: <1371760220.13.0.623339240586.issue18273@psf.upfronthosting.co.za> |
| 2013年06月20日 20:30:20 | zach.ware | link | issue18273 messages |
| 2013年06月20日 20:30:19 | zach.ware | create |
|