5 Commits

Author SHA1 Message Date
John L. Villalovos
1285baee1c Create a SerializableComparable class
Create a SerializableComparable class derived from the Serializable
class.

Added the following functions to the SerializableComparable class:
  '__eq__'
  '__ne__'

Disable the '__hash__' function in the SerializableComparable class as
some derived classes are mutable.

Use the SerializableComparable class in hardware.py and
extensions/base.py

This should make unit testing users of the class easier when doing a
self.assertEqual() or self.assertNotEqual()

Added some initial unit testing for encoding.py

Change-Id: If0f14b3bfe7f1391f65dd730a16a534afed0da82
2015-09-11 13:44:09 -07:00
Jim Rollenhagen
601201d120 Update hacking and fix hacking violations
This does a few things:

* Update hacking to the version in global-requirements. Old hacking was
  installing a version of pbr that was breaking other packages.

* Fix all the hacking/pep8 rules that updating hacking raised.

* Do some general docstring cleanup, while already in there cleaning up
  a bunch of docstrings due to H405 violations.

Change-Id: I1fc1e59d4c3d7b14631f8b576e3f3854bc452188
Closes-Bug: #1461717
2015-06-03 16:58:57 -07:00
Alexander Gordeev
ed4460990e Make encoding.serialize() more programmatical
Introduce `serializable_fields` to express which class attributes
to be serialized.

Get rid of OrderedDict. Just replacing it with regular dict.

Change-Id: I3f7639dab171d3d62e92d0d1bb6d7b071cf963ad
2014-05-06 18:02:45 +04:00
Jim Rollenhagen
3c1d52cbb1 Use # instead of """ for copyright blocks
Reformats copyright messages to be comments rather than
docstring-style blocks.

Change-Id: I4d863f53b67bb49d03bda0952b9e6179b6d23c59
2014-04-10 07:14:06 -07:00
Josh Gachnang
b30d345c2e Renaming to IPA 2014-03-19 15:50:43 -07:00