summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_enum.py
Commit message (Collapse)AuthorAgeFilesLines
* [3.6] bpo-30616: Functional API of enum allows to create empty enums. ↵Dong-hee Na2017-06-241-0/+20
| | | | (#2304) (#2324)
* closes issue29167: fix race condition in (Int)FlagEthan Furman2017-01-241-2/+88
|
* close issue28172: Change all example enum member names to uppercase, per ↵Ethan Furman2016-11-211-3/+3
| | | | Guido; patch by Chris Angelico.
* issue23591: fix flag decomposition and reprEthan Furman2016-09-181-28/+77
|
* issue23591: add auto() for auto-generating Enum member valuesEthan Furman2016-09-111-2/+75
|
* issue23591: more docs; slight change to reprEthan Furman2016-09-041-6/+6
|
* issue23591: bool(empty_flags) == False; more docs & testsEthan Furman2016-09-021-0/+16
|
* issue23591: add docs; code cleanup; more testsEthan Furman2016-09-021-17/+71
|
* issue23591: add Flags, IntFlags, and testsEthan Furman2016-08-311-1/+451
|
* issue26981: add _order_ compatibility shim to enum.EnumEthan Furman2016-08-201-0/+62
|
* Issue26988: remove AutoEnumEthan Furman2016-08-201-323/+1
|
* Add AutoEnum: automatically provides next value if missing. Issue 26988.Ethan Furman2016-08-051-1/+323
|
* Issue #27626: Merge spelling fixes from 3.5Martin Panter2016-07-281-10/+10
|\
| * Issue #27626: Spelling fixes in docs, comments and internal namesMartin Panter2016-07-281-10/+10
| | | | | | | | Based on patch by Ville Skyttä.
* | signal, socket, and ssl module IntEnum constant name lookups now return aGregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)2016-06-031-0/+36
| | | | | | | | | | | | | | | | consistent name for values having multiple names. Ex: signal.Signals(6) now refers to itself as signal.SIGALRM rather than flipping between that and signal.SIGIOT based on the interpreter's hash randomization seed. This helps finish issue27167.
* | Issue #23640: int.from_bytes() no longer bypasses constructors for subclasses.Serhiy Storchaka2016-05-121-0/+12
|\ \ | |/
| * Issue #23640: int.from_bytes() no longer bypasses constructors for subclasses.Serhiy Storchaka2016-05-121-0/+12
| |
* | issue26893: use mro() to examine class heirarchyEthan Furman2016-05-011-0/+13
|\ \ | |/
| * issue26893: use mro() to examine class heirarchyEthan Furman2016-05-011-0/+13
| |
* | Issue26748: Enum classes should evaluate as TrueEthan Furman2016-04-141-0/+13
|\ \ | |/
| * Issue26748: Enum classes should evaluate as TrueEthan Furman2016-04-141-0/+13
| |\
| | * Issue26748: Enum classes should evaluate as TrueEthan Furman2016-04-141-0/+13
| | |
| | * issue23673Ethan Furman2015-03-191-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | add private method to enum to support replacing global constants with Enum members: - search for candidate constants via supplied filter - create new enum class and members - insert enum class and replace constants with members via supplied module name - replace __reduce_ex__ with function that returns member name, so previous Python versions can unpickle modify IntEnum classes to use new method
* | | revert change 87a9dff5106c: pure Enum members again evaluate to True;Ethan Furman2016-01-151-1/+16
| | | | | | | | | | | | | | | update Finer Points section of docs to cover boolean evaluation; add more tests for pure and mixed boolean evaluation
* | | Issue #23883: Add missing APIs to __all__; patch by Jacek KołodziejMartin Panter2015-11-141-0/+7
| | |
* | | Close issue24840: Enum._value_ is queried for bool(); original patch by Mike ↵Ethan Furman2015-09-181-0/+7
|/ / | | | | | | Lundy
* | Close issue23900: add default __doc__ to new enumerations that do not ↵Ethan Furman2015-04-121-5/+5
| | | | | | | | specify one.
* | Issue23826: fix doc test for -OO runsEthan Furman2015-04-111-4/+35
| |
* | Fixed test_enum for issue #15582.Serhiy Storchaka2015-04-041-0/+4
| |
* | Issue #23611: Fixed enums pickling tests. Now all picklings work with allSerhiy Storchaka2015-03-311-15/+7
| | | | | | | | protocols.
* | issue23673Ethan Furman2015-03-191-0/+8
| | | | | | | | | | | | | | | | | | add private method to enum to support replacing global constants with Enum members: - search for candidate constants via supplied filter - create new enum class and members - insert enum class and replace constants with members via supplied module name - replace __reduce_ex__ with function that returns member name, so previous Python versions can unpickle modify IntEnum classes to use new method
* | Issue22506: merge from 3.4Ethan Furman2014-10-141-0/+12
|\ \ | |/
| * Issue22506: added methods on base Enum class now show up in dir of Enum ↵Ethan Furman2014-10-141-0/+12
| | | | | | | | subclass (3.4)
* | Close issue21706: add 'start' parameter to functional APIEthan Furman2014-09-171-0/+66
|/
* Issue #21773: Fix TestStdLib.test_pydoc() of test_enum. Patch written byVictor Stinner2014-06-161-3/+1
| | | | | | | Claudiu Popa. The print_diffs() function was not defined, using the assertEqual() is more reliable.
* Close issue20653: allow Enum subclasses to override __reduce_ex__Ethan Furman2014-02-181-1/+60
|
* Close issue20534: all pickle protocols now supported.Ethan Furman2014-02-081-7/+205
|
* Close issue20534: test_enum now tests all supported pickle protocols (2 - ↵Ethan Furman2014-02-071-24/+36
| | | | HIGHEST_PROTOCOL, inclusive).
* removed Enum.__eq__ as it added nothingEthan Furman2013-11-131-0/+11
|
* Close #19263: add tests to ensure __objclass__ correctly set.Ethan Furman2013-10-221-1/+116
|
* Close #19252: better test coverage for Enum. Thanks, CliffMEthan Furman2013-10-171-2/+4
|
* Close #19156: add tests and fix for Enum helper edge cases. Patch from CliffM.Ethan Furman2013-10-071-0/+29
|
* Close #19025: Better error message when trying to delete an Enum member.Ethan Furman2013-09-221-0/+21
| | | | Also slight code reorg for PEP 8 guidelines.
* Close #18693: Enum is now more help() friendly.Ethan Furman2013-09-151-2/+17
|
* Close #18989: enum members will no longer overwrite other attributes, nor be ↵Ethan Furman2013-09-151-11/+26
| | | | overwritten by them.
* Add __reversed__ to Enum. Minor code reorg (moved __members__ to be in ↵Ethan Furman2013-09-151-0/+7
| | | | alpha order).
* Close #18924: Block naive attempts to change an Enum member.Ethan Furman2013-09-061-0/+5
|
* Close #18738: Route __format__ calls to mixed-in type for mixed Enums (such ↵Ethan Furman2013-09-011-2/+100
| | | | as IntEnum).
* Issue 18693: Put custom __dir__ back in place. Will instead look at fixing ↵Ethan Furman2013-08-121-0/+15
| | | | `help()`.
* Close #18693: __dir__ removed from Enum; help() now helpful.Ethan Furman2013-08-101-15/+0
|