Message171270
| Author |
chris.jerdonek |
| Recipients |
chris.jerdonek, ezio.melotti |
| Date |
2012年09月25日.13:28:41 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1348579722.08.0.96812684384.issue16045@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
The built-in function int() does not seem to have any basic unit tests (e.g. in test_builtin). It would be good to add some.
Some cases (including edge cases) for possible inclusion:
int()
int(base='foo') # no exception; returns 0
int(x=5)
int(x=5, base=10) # raises TypeError
int(5.8) # test truncation towards zero
int(-5.8) # ditto
int('5.8') # raises ValueError
Both positional and keyword argument combinations should be tested. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年09月25日 13:28:42 | chris.jerdonek | set | recipients:
+ chris.jerdonek, ezio.melotti |
| 2012年09月25日 13:28:42 | chris.jerdonek | set | messageid: <1348579722.08.0.96812684384.issue16045@psf.upfronthosting.co.za> |
| 2012年09月25日 13:28:41 | chris.jerdonek | link | issue16045 messages |
| 2012年09月25日 13:28:41 | chris.jerdonek | create |
|