Skip to content

New types #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Mar 21, 2023
Merged

New types #7

merged 22 commits into from
Mar 21, 2023

Conversation

TargetedEntropy
Copy link
Owner

…which types should be allowed. This was done to handle bool being a subclass of int
* 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?
strings and bytes are the same on python2.

Fixed a non PEP8-compliant space.

Added tests for Integer and UnsignedInteger datatypes.
UnsignedIntegerTest not being bytes.

Added Long and UnsignedLong tests.
Implemented compatibility layer for the long type (has been removed in
py3)

Added test for long-type compat.
This required the implementation of a new method on BaseDatatypeTester.

dynamic_assert_equal is overridden by floating point datatypes, and
instead uses TestCase.assertAlmostEqual.
Removed unused import (SerializationError)

We now check if Datatype.SIZE is a number using ABC.

Added 2 decorators for raising serialized and deserialized data
exceptions.

Datatype.SIZE can now be either a number or a sequence. If sequence,
first value is MIN_SIZE and second value is MAX_SIZE

VarInt.serialize now raises ValueError instead of SerializationError
when number is too big to serialize.
@TargetedEntropy TargetedEntropy merged commit 07f0ca8 into TargetedEntropy:master Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants