@@ -148,6 +148,24 @@ def test_interval_positional_init(self):
148
148
'msgpack' : (b'\x00 ' ),
149
149
'tarantool' : r"datetime.interval.new({adjust='excess'})" ,
150
150
},
151
+ 'weeks' : {
152
+ 'python' : tarantool .Interval (week = 3 ),
153
+ 'msgpack' : (b'\x02 \x02 \x03 \x08 \x01 ' ),
154
+ 'tarantool' : r"datetime.interval.new({week=3})" ,
155
+ },
156
+ 'date_with_week' : {
157
+ 'python' : tarantool .Interval (year = 1 , month = 2 , week = 3 , day = 4 ),
158
+ 'msgpack' : (b'\x05 \x00 \x01 \x01 \x02 \x02 \x03 \x03 \x04 \x08 \x01 ' ),
159
+ 'tarantool' : r"datetime.interval.new({year=1, month=2, week=3, day=4})" ,
160
+ },
161
+ 'datetime_with_week' : {
162
+ 'python' : tarantool .Interval (year = 1 , month = 2 , week = 3 , day = 4 , hour = 1 , minute = 2 ,
163
+ sec = 3000 , nsec = 10000000 ),
164
+ 'msgpack' : (b'\x09 \x00 \x01 \x01 \x02 \x02 \x03 \x03 \x04 \x04 \x01 \x05 \x02 \x06 \xcd \x0b \xb8 '
165
+ b'\x07 \xce \x00 \x98 \x96 \x80 \x08 \x01 ' ),
166
+ 'tarantool' : r"datetime.interval.new({year=1, month=2, week=3, day=4, hour=1, "
167
+ r"min=2, sec=3000, nsec=10000000})" ,
168
+ },
151
169
}
152
170
153
171
def test_msgpack_decode (self ):
0 commit comments