bieli / IoText-data-protocol

Internet of Things data protocol - simplistic text and CSV-friendly IoT data protocol. Options: Schema-less, schema+versioning, building deltas for data values. Easy to re-use.
Apache License 2.0
0 stars 2 forks source link

Class IoTextCodec in decode method have bug or bug exists in implementation #1

Closed bieli closed 1 year ago

bieli commented 1 year ago

Unit test skipped - to fixing - is here

bieli commented 1 year ago

Solution to review https://github.com/bieli/IoText-data-protocol/pull/5 Thx @ksyuzi

przemek1236 commented 1 year ago

So it looks like there are 2 dataclasses defined with exactly the same name Item, one resides in types/item.py and second one is inside of types/item_type.py and both are exactly the same. Implementation of the library in src uses former, where tests uses the latter. This causes the error at the very beginning because instances are of a different classes. @ksyuzi

ksyuzi commented 1 year ago

@przemek1236 thank you, but the explanation wasn't necessary, I figured it out and committed this fix. @bieli both tests now pass, so no need for the TODO. please, take a look.

bieli commented 1 year ago

Great contribution ;-)

I merged solution today and propose next bug fixes here #12 (+ code coverage)