Commit Graph

7 Commits

Author SHA1 Message Date
Jeppe Klitgaard
20e7c70acf Implemented tests for the Float datatype.
This required the implementation of a new method on BaseDatatypeTester.

dynamic_assert_equal is overridden by floating point datatypes, and
instead uses TestCase.assertAlmostEqual.
2015-04-16 18:49:23 +02:00
Jeppe Klitgaard
cc184f3e4d Added tests for LongLong and UnsignedLongLong.
Implemented compatibility layer for the long type (has been removed in
py3)

Added test for long-type compat.
2015-04-16 17:05:44 +02:00
Jeppe Klitgaard
4e6f223a7d Fixed 3 of the VALID_VALUES on the
UnsignedIntegerTest not being bytes.

Added Long and UnsignedLong tests.
2015-04-16 15:59:18 +02:00
Jeppe Klitgaard
5eddb67489 Removed non-empty string deserialization test, as
strings and bytes are the same on python2.

Fixed a non PEP8-compliant space.

Added tests for Integer and UnsignedInteger datatypes.
2015-04-16 15:49:43 +02:00
Jeppe Klitgaard
a31f1c543f More datatype abstraction:
* NumberDatatype
* StringDatatype

_raise_serialization_value_error_data is now a classmethod instead of a classmethod.

Tests for MIN and MAX number values of NumberDatatypes have been made more abstract.

TEST_DATA_* has been removed from variable names. Sometimes it can get a little too rediculous with these var-names, don't you think?
2015-04-16 09:02:54 +02:00
Jeppe Klitgaard
73b990cc81 Added DISALLOWED_SERIALIZATION_TYPES, making it easier to cherrypick which types should be allowed. This was done to handle bool being a subclass of int 2015-04-14 20:06:53 +02:00
Jeppe Klitgaard
bac87695ff Implemented some of the datatypes and some tests for them. 2015-04-14 19:49:11 +02:00