[docs] Code, test, and doc review for PEP-0435 Enum (issue 17947)

zachary.ware at gmail.com zachary.ware at gmail.com
Fri May 10 17:30:54 CEST 2013


Just a few comments on the test module.


http://bugs.python.org/review/17947/diff/8105/Lib/test/test_enum.py
File Lib/test/test_enum.py (right):

http://bugs.python.org/review/17947/diff/8105/Lib/test/test_enum.py#newcode1
Lib/test/test_enum.py:1: #!/usr/bin/python3.3
3.4

http://bugs.python.org/review/17947/diff/8105/Lib/test/test_enum.py#newcode8
Lib/test/test_enum.py:8: print('Using Python', sys.version)
Extra output isn't very well appreciated in the test suite output.

http://bugs.python.org/review/17947/diff/8105/Lib/test/test_enum.py#newcode54
Lib/test/test_enum.py:54: print(exc)
Since all of these above are simply creating enums without any kind of
special trickery going on, they really really shouldn't raise any
exceptions.  If they do, we should just let unittest handle them and
flag the test as a failure.  Taking out the try/excepts will also make
Question's line short enough :)

http://bugs.python.org/review/17947/diff/8105/Lib/test/test_enum.py#newcode103
Lib/test/test_enum.py:103: '<Season.{0}: {1}>'.format(season, i))
Whitespace between methods

http://bugs.python.org/review/17947/diff/8105/Lib/test/test_enum.py#newcode634
Lib/test/test_enum.py:634: '''stub for testing one at a time'''
This should be removed.

http://bugs.python.org/review/17947/


More information about the docs mailing list