Message193208
In looking at test_decimal for issue16748, I discovered that not all of the doctests for _decimal are being tested. So, I fixed it (or at least tried to :).
This patch does the following:
- Replace most inspect.isfunction checks in DocTestFinder with inspect.isroutine
- Add a check to DocTestFinder._from_module for method_descriptors
- Correct a doctest on float.fromhex (which is incorrect back to 2.7) due to the new float repr
- Add a couple doctests to the builtins module because previously there were no functions in builtins with docstrings for testing against. I chose to add to bin(), hex(), and oct(); I believe those three can benefit from having the docstring show the format of the output string. I'm not terribly attached to those, though, so if anyone has a better suggestion for testing, I'm all ears.
- Add tests using the builtins module (since it's a C module that's definitely going to be available).
- Add doctests to test_builtin (because the tests aren't actually run in test_doctest, just found). While at it, convert test_builtin to unittest.main(). I believe test_builtin should grow doctest running even if the doctests I added to bin, hex, and oct aren't kept; float and int have some doctests that should be kept up to date.
- Add notes to the docs. |
|
Date |
User |
Action |
Args |
2013-07-17 04:33:33 | zach.ware | set | recipients:
+ zach.ware, tim.peters, fer_perez, amaury.forgeotdarc, ash |
2013-07-17 04:33:33 | zach.ware | set | messageid: <1374035613.52.0.56061299944.issue3158@psf.upfronthosting.co.za> |
2013-07-17 04:33:33 | zach.ware | link | issue3158 messages |
2013-07-17 04:33:33 | zach.ware | create | |
|