@@ -89,7 +89,7 @@ def test_whole_second_time_input(cypher_eval):
8989def test_nanosecond_resolution_time_input (cypher_eval ):
9090 result = cypher_eval ("CYPHER runtime=interpreted WITH $x AS x "
9191 "RETURN [x.hour, x.minute, x.second, x.nanosecond]" ,
92- x = Time (12 , 34 , 56. 789012345 ))
92+ x = Time (12 , 34 , 56 , 789012345 ))
9393 hour , minute , second , nanosecond = result
9494 assert hour == 12
9595 assert minute == 34
@@ -101,7 +101,7 @@ def test_time_with_numeric_time_offset_input(cypher_eval):
101101 result = cypher_eval ("CYPHER runtime=interpreted WITH $x AS x "
102102 "RETURN [x.hour, x.minute, x.second, "
103103 " x.nanosecond, x.offset]" ,
104- x = Time (12 , 34 , 56. 789012345 , tzinfo = FixedOffset (90 )))
104+ x = Time (12 , 34 , 56 , 789012345 , tzinfo = FixedOffset (90 )))
105105 hour , minute , second , nanosecond , offset = result
106106 assert hour == 12
107107 assert minute == 34
@@ -150,7 +150,7 @@ def test_nanosecond_resolution_datetime_input(cypher_eval):
150150 result = cypher_eval ("CYPHER runtime=interpreted WITH $x AS x "
151151 "RETURN [x.year, x.month, x.day, "
152152 " x.hour, x.minute, x.second, x.nanosecond]" ,
153- x = DateTime (1976 , 6 , 13 , 12 , 34 , 56. 789012345 ))
153+ x = DateTime (1976 , 6 , 13 , 12 , 34 , 56 , 789012345 ))
154154 year , month , day , hour , minute , second , nanosecond = result
155155 assert year == 1976
156156 assert month == 6
@@ -166,7 +166,7 @@ def test_datetime_with_numeric_time_offset_input(cypher_eval):
166166 "RETURN [x.year, x.month, x.day, "
167167 " x.hour, x.minute, x.second, "
168168 " x.nanosecond, x.offset]" ,
169- x = DateTime (1976 , 6 , 13 , 12 , 34 , 56. 789012345 ,
169+ x = DateTime (1976 , 6 , 13 , 12 , 34 , 56 , 789012345 ,
170170 tzinfo = FixedOffset (90 )))
171171 year , month , day , hour , minute , second , nanosecond , offset = result
172172 assert year == 1976
@@ -180,7 +180,7 @@ def test_datetime_with_numeric_time_offset_input(cypher_eval):
180180
181181
182182def test_datetime_with_named_time_zone_input (cypher_eval ):
183- dt = DateTime (1976 , 6 , 13 , 12 , 34 , 56. 789012345 )
183+ dt = DateTime (1976 , 6 , 13 , 12 , 34 , 56 , 789012345 )
184184 input_value = timezone ("US/Pacific" ).localize (dt )
185185 result = cypher_eval ("CYPHER runtime=interpreted WITH $x AS x "
186186 "RETURN [x.year, x.month, x.day, "
@@ -199,7 +199,7 @@ def test_datetime_with_named_time_zone_input(cypher_eval):
199199
200200
201201def test_datetime_array_input (cypher_eval ):
202- data = [DateTime (2018 , 4 , 6 , 13 , 4 , 42. 516120 ), DateTime (1976 , 6 , 13 )]
202+ data = [DateTime (2018 , 4 , 6 , 13 , 4 , 42 , 516120 ), DateTime (1976 , 6 , 13 )]
203203 value = cypher_eval ("CREATE (a {x:$x}) RETURN a.x" , x = data )
204204 assert value == data
205205
@@ -209,7 +209,7 @@ def test_duration_input(cypher_eval):
209209 "RETURN [x.months, x.days, x.seconds, "
210210 " x.microsecondsOfSecond]" ,
211211 x = Duration (years = 1 , months = 2 , days = 3 , hours = 4 ,
212- minutes = 5 , seconds = 6. 789012 ))
212+ minutes = 5 , seconds = 6 , microseconds = 789012 ))
213213 months , days , seconds , microseconds = result
214214 assert months == 14
215215 assert days == 3
@@ -258,13 +258,13 @@ def test_whole_second_time_output(cypher_eval):
258258def test_nanosecond_resolution_time_output (cypher_eval ):
259259 value = cypher_eval ("RETURN time('12:34:56.789012345')" )
260260 assert isinstance (value , Time )
261- assert value == Time (12 , 34 , 56. 789012345 , tzinfo = FixedOffset (0 ))
261+ assert value == Time (12 , 34 , 56 , 789012345 , tzinfo = FixedOffset (0 ))
262262
263263
264264def test_time_with_numeric_time_offset_output (cypher_eval ):
265265 value = cypher_eval ("RETURN time('12:34:56.789012345+0130')" )
266266 assert isinstance (value , Time )
267- assert value == Time (12 , 34 , 56. 789012345 , tzinfo = FixedOffset (90 ))
267+ assert value == Time (12 , 34 , 56 , 789012345 , tzinfo = FixedOffset (90 ))
268268
269269
270270def test_whole_second_localtime_output (cypher_eval ):
@@ -276,7 +276,7 @@ def test_whole_second_localtime_output(cypher_eval):
276276def test_nanosecond_resolution_localtime_output (cypher_eval ):
277277 value = cypher_eval ("RETURN localtime('12:34:56.789012345')" )
278278 assert isinstance (value , Time )
279- assert value == Time (12 , 34 , 56. 789012345 )
279+ assert value == Time (12 , 34 , 56 , 789012345 )
280280
281281
282282def test_whole_second_datetime_output (cypher_eval ):
@@ -288,22 +288,22 @@ def test_whole_second_datetime_output(cypher_eval):
288288def test_nanosecond_resolution_datetime_output (cypher_eval ):
289289 value = cypher_eval ("RETURN datetime('1976-06-13T12:34:56.789012345')" )
290290 assert isinstance (value , DateTime )
291- assert value == DateTime (1976 , 6 , 13 , 12 , 34 , 56. 789012345 , tzinfo = utc )
291+ assert value == DateTime (1976 , 6 , 13 , 12 , 34 , 56 , 789012345 , tzinfo = utc )
292292
293293
294294def test_datetime_with_numeric_time_offset_output (cypher_eval ):
295295 value = cypher_eval ("RETURN "
296296 "datetime('1976-06-13T12:34:56.789012345+01:30')" )
297297 assert isinstance (value , DateTime )
298- assert value == DateTime (1976 , 6 , 13 , 12 , 34 , 56. 789012345 ,
298+ assert value == DateTime (1976 , 6 , 13 , 12 , 34 , 56 , 789012345 ,
299299 tzinfo = FixedOffset (90 ))
300300
301301
302302def test_datetime_with_named_time_zone_output (cypher_eval ):
303303 value = cypher_eval ("RETURN datetime('1976-06-13T12:34:56.789012345"
304304 "[Europe/London]')" )
305305 assert isinstance (value , DateTime )
306- dt = DateTime (1976 , 6 , 13 , 12 , 34 , 56. 789012345 )
306+ dt = DateTime (1976 , 6 , 13 , 12 , 34 , 56 , 789012345 )
307307 assert value == timezone ("Europe/London" ).localize (dt )
308308
309309
@@ -317,21 +317,21 @@ def test_nanosecond_resolution_localdatetime_output(cypher_eval):
317317 value = cypher_eval ("RETURN "
318318 "localdatetime('1976-06-13T12:34:56.789012345')" )
319319 assert isinstance (value , DateTime )
320- assert value == DateTime (1976 , 6 , 13 , 12 , 34 , 56. 789012345 )
320+ assert value == DateTime (1976 , 6 , 13 , 12 , 34 , 56 , 789012345 )
321321
322322
323323def test_duration_output (cypher_eval ):
324324 value = cypher_eval ("RETURN duration('P1Y2M3DT4H5M6.789S')" )
325325 assert isinstance (value , Duration )
326326 assert value == Duration (years = 1 , months = 2 , days = 3 , hours = 4 ,
327- minutes = 5 , seconds = 6. 789 )
327+ minutes = 5 , seconds = 6 , milliseconds = 789 )
328328
329329
330330def test_nanosecond_resolution_duration_output (cypher_eval ):
331331 value = cypher_eval ("RETURN duration('P1Y2M3DT4H5M6.789123456S')" )
332332 assert isinstance (value , Duration )
333333 assert value == Duration (years = 1 , months = 2 , days = 3 , hours = 4 ,
334- minutes = 5 , seconds = 6. 789123456 )
334+ minutes = 5 , seconds = 6 , nanoseconds = 789123456 )
335335
336336
337337def test_datetime_parameter_case1 (session ):
0 commit comments