- Add copyright headers to files that did not already have them
- Update the year to the last year the file was modified in files with
existing headers.
As part of commit #b3de85 porting to WA3, the behaviour of Enums changed
so that the attribute to be fetched is converted to lower case before
the lookup occurs. Due to the fact that 'names' is a predefined
attribute of the Enum class this clashes and will return the full list
of names instead of the individual entry. Update the test to use another
non reserved entry.
This should have been handled by the @total_ordering decorator, but
isn't due to
https://bugs.python.org/issue25732
(briefly, total_ordering is back-ported from Python 3, where the base
object provides the default implementation of __ne__ based on __eq__, so
total_ordering did not override it; this, however does not happen in
Python 2).
Also update unit tests to catch this edge case.
During Python 3 migration, the izip call inside diff_interrupt_files has
been replaced with a zip call (zip returning an iterator in Python 3).
Import zip from builtins to ensure that it also produces an iterator in
Python 2.
Also fix the associated unit test by importing the correct function.
The current test was designed to test the removed `Agenda` class, we now
use use an `AgendaParser` so update the tests to test its functionality
instead.
Previously the `once_per_instance` used the output of `__repr__` to
identify the class of where the decorated method was called from. For
classes that override this method to produce the same output for
different instances of the same class this caused different instances to
be mistakenly treated as one. Now use the hash of the containing class
instead of the string representation and update the tests to catch this
error.
- What used to be enum.values is now enum.levels.
- Add enum.names and enum.values that are lists of enum's levels' names
and values respectively.
- Add a check on creation to make sure that provided level names do not
conflict with the atomatically created members.
Previously there was no differentiation between the same method at different
inheritance levels, therefore using the once_per_instance_decorator with super call would
prevent the super call from executing as they were considered the same
instance.
Add to/from_pod implementations to level, so that it may be serialized
properly. In order to make sure that serialization is a reversible
operation, ensure that the level value is numeric.
Tests now reside in the root of the repo, rather than in wa package.
This means they will no longer packaged and installed in user
deployments (they're only useful for developers).