Skip to content

Commit 117b523

Browse files
committed
[ExecuteTime] fix test comparison to use datetime objects
rather than the string tags, which can causes problems comparing the offsets +00:00 and Z
1 parent 9934706 commit 117b523

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/test_preprocessors.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22

3+
import datetime
34
import json
45
import os
56

@@ -132,5 +133,6 @@ def test_preprocessor_execute_time():
132133
assert_in('start_time', etmd)
133134
assert_in('end_time', etmd)
134135
assert_greater_equal(
135-
etmd['end_time'], etmd['start_time'],
136+
datetime.datetime.utcfromtimestamp(etmd['end_time']),
137+
datetime.datetime.utcfromtimestamp(etmd['start_time']),
136138
'end_time should be after start time')

0 commit comments

Comments
 (0)