[issue20510] Test cases in test_sys don't match the comments

2014-02-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset 292cac3afca6 by Zachary Ware in branch '2.7': Issue #20510: Confirm that the code attribute of the SystemExit http://hg.python.org/cpython/rev/292cac3afca6 New changeset 71411d5f3c8b by Zachary Ware in branch '3.3': Issue #20510: Confirm that the co

[issue20510] Test cases in test_sys don't match the comments

2014-02-19 Thread Zachary Ware
Zachary Ware added the comment: I considered doing a test like that, but figured it was pretty well covered by the assert_python_ok no-arg test. On the other hand, it looks like we document that the default value of SystemExit().code is None, so it should be tested. I'll add it in. Thanks,

[issue20510] Test cases in test_sys don't match the comments

2014-02-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What about following test? with self.assertRaises(SystemExit) as cm: sys.exit() self.assertIsNone(cm.exception.code) -- nosy: +serhiy.storchaka ___ Python tracker

[issue20510] Test cases in test_sys don't match the comments

2014-02-18 Thread Zachary Ware
Zachary Ware added the comment: Fixed, thanks for the report and patch! And btw, you are right to avoid "while we're in there" changes in general, but modernizing the test suite gets a little bit of leniency in that regard. It wouldn't have been appropriate to venture outside of test_exit in

[issue20510] Test cases in test_sys don't match the comments

2014-02-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 63f0a1e95d2b by Zachary Ware in branch '2.7': Issue #20510: Rewrote test_exit in test_sys to match existing comments http://hg.python.org/cpython/rev/63f0a1e95d2b New changeset fa81f6ddd60e by Zachary Ware in branch '3.3': Issue #20510: Rewrote test

[issue20510] Test cases in test_sys don't match the comments

2014-02-17 Thread Zachary Ware
Zachary Ware added the comment: The newer patch looks good to me, I'll get it committed as soon as I can test it. Thanks! -- assignee: -> zach.ware ___ Python tracker ___

[issue20510] Test cases in test_sys don't match the comments

2014-02-04 Thread Gareth Rees
Gareth Rees added the comment: I normally try not to make changes "while we're in here" for fear of introducing errors! But I guess the test cases are less critical, so I've taken your review comments as a license to submit a revised patch that: * incorporates your suggestion to use assert_pytho

[issue20510] Test cases in test_sys don't match the comments

2014-02-04 Thread Zachary Ware
Zachary Ware added the comment: Good catch! See my review comments. Also, if you haven't already, could you please sign a contributor's agreement? See http://www.python.org/psf/contrib/. -- stage: -> patch review versions: +Python 2.7, Python 3.3 ___

[issue20510] Test cases in test_sys don't match the comments

2014-02-04 Thread Zachary Ware
Changes by Zachary Ware : -- nosy: +zach.ware ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue20510] Test cases in test_sys don't match the comments

2014-02-04 Thread Gareth Rees
New submission from Gareth Rees: Lib/test/test_sys.py contains test cases with incorrect comments -- or comments with incorrect test cases, if you prefer: # call without argument try: sys.exit(0) except SystemExit as exc: self.assertEqual(exc.code, 0) ... # c