Skip to content

Commit 1fe5898

Browse files
author
Joe Talerico
committed
Fix sample.csv dates
Update the dates so the test samples works closes #11 Signed-off-by: Joe Talerico <[email protected]>
1 parent 7435ad9 commit 1fe5898

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

tests/importer_test.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ def test_import_csv_with_time_filter():
5555
importer = CsvImporter()
5656
selector = data_selector()
5757
tz = pytz.timezone("Etc/GMT+1")
58-
selector.since_time = datetime(2021, 1, 5, 0, 0, 0, tzinfo=tz)
59-
selector.until_time = datetime(2021, 1, 7, 0, 0, 0, tzinfo=tz)
58+
selector.since_time = datetime(2024, 1, 5, 0, 0, 0, tzinfo=tz)
59+
selector.until_time = datetime(2024, 1, 7, 0, 0, 0, tzinfo=tz)
6060
series = importer.fetch_data(test, selector=selector)
6161
assert len(series.data.keys()) == 2
6262
assert len(series.time) == 2
@@ -72,7 +72,7 @@ def test_import_csv_with_unix_timestamps():
7272
assert len(series.time) == 10
7373
assert len(series.data["m1"]) == 10
7474
assert len(series.data["m2"]) == 10
75-
ts = datetime(2021, 1, 1, 2, 0, 0, tzinfo=pytz.UTC).timestamp()
75+
ts = datetime(2024, 1, 1, 2, 0, 0, tzinfo=pytz.UTC).timestamp()
7676
assert series.time[0] == ts
7777

7878

tests/resources/sample.csv

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
time,commit,metric1,metric2
2-
2021.01.01 3:00:00 +0100,aaa0,154023,10.43
3-
2021.01.02 3:00:00 +0100,aaa1,138455,10.23
4-
2021.01.03 3:00:00 +0100,aaa2,143112,10.29
5-
2021.01.04 3:00:00 +0100,aaa3,149190,10.91
6-
2021.01.05 3:00:00 +0100,aaa4,132098,10.34
7-
2021.01.06 3:00:00 +0100,aaa5,151344,10.69
8-
2021.01.07 3:00:00 +0100,aaa6,155145,9.23
9-
2021.01.08 3:00:00 +0100,aaa7,148889,9.11
10-
2021.01.09 3:00:00 +0100,aaa8,149466,9.13
11-
2021.01.10 3:00:00 +0100,aaa9,148209,9.03
2+
2024.01.01 3:00:00 +0100,aaa0,154023,10.43
3+
2024.01.02 3:00:00 +0100,aaa1,138455,10.23
4+
2024.01.03 3:00:00 +0100,aaa2,143112,10.29
5+
2024.01.04 3:00:00 +0100,aaa3,149190,10.91
6+
2024.01.05 3:00:00 +0100,aaa4,132098,10.34
7+
2024.01.06 3:00:00 +0100,aaa5,151344,10.69
8+
2024.01.07 3:00:00 +0100,aaa6,155145,9.23
9+
2024.01.08 3:00:00 +0100,aaa7,148889,9.11
10+
2024.01.09 3:00:00 +0100,aaa8,149466,9.13
11+
2024.01.10 3:00:00 +0100,aaa9,148209,9.03

0 commit comments

Comments
 (0)