File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -739,7 +739,7 @@ def test_vector(self):
739739 """Tests of subtype 9"""
740740 # We start with valid cases, across the 3 dtypes implemented.
741741 # Work with a simple vector that can be interpreted as int8, float32, or ubyte
742- list_vector = [127 , 7 ]
742+ list_vector = [127 , 8 ]
743743 # As INT8, vector has length 2
744744 binary_vector = Binary .from_vector (list_vector , BinaryVectorDtype .INT8 )
745745 vector = binary_vector .as_vector ()
@@ -764,18 +764,18 @@ def test_vector(self):
764764 uncompressed = ""
765765 for val in list_vector :
766766 uncompressed += format (val , "08b" )
767- assert uncompressed [:- padding ] == "0111111100000 "
767+ assert uncompressed [:- padding ] == "0111111100001 "
768768
769769 # It is worthwhile explicitly showing the values encoded to BSON
770770 padded_doc = {"padded_vec" : padded_vec }
771771 assert (
772772 encode (padded_doc )
773- == b"\x1a \x00 \x00 \x00 \x05 padded_vec\x00 \x04 \x00 \x00 \x00 \t \x10 \x03 \x7f \x07 \x00 "
773+ == b"\x1a \x00 \x00 \x00 \x05 padded_vec\x00 \x04 \x00 \x00 \x00 \t \x10 \x03 \x7f \x08 \x00 "
774774 )
775775 # and dumped to json
776776 assert (
777777 json_util .dumps (padded_doc )
778- == '{"padded_vec": {"$binary": {"base64": "EAN/Bw ==", "subType": "09"}}}'
778+ == '{"padded_vec": {"$binary": {"base64": "EAN/CA ==", "subType": "09"}}}'
779779 )
780780
781781 # FLOAT32 is also implemented
You can’t perform that action at this time.
0 commit comments