Skip to content

Commit

Permalink
Merge pull request #12 from jtaleric/fix-sample-date
Browse files Browse the repository at this point in the history
Fix sample.csv dates
  • Loading branch information
smccarthy788 authored Jan 19, 2024
2 parents 7435ad9 + 1fe5898 commit d7eb144
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions tests/importer_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ def test_import_csv_with_time_filter():
importer = CsvImporter()
selector = data_selector()
tz = pytz.timezone("Etc/GMT+1")
selector.since_time = datetime(2021, 1, 5, 0, 0, 0, tzinfo=tz)
selector.until_time = datetime(2021, 1, 7, 0, 0, 0, tzinfo=tz)
selector.since_time = datetime(2024, 1, 5, 0, 0, 0, tzinfo=tz)
selector.until_time = datetime(2024, 1, 7, 0, 0, 0, tzinfo=tz)
series = importer.fetch_data(test, selector=selector)
assert len(series.data.keys()) == 2
assert len(series.time) == 2
Expand All @@ -72,7 +72,7 @@ def test_import_csv_with_unix_timestamps():
assert len(series.time) == 10
assert len(series.data["m1"]) == 10
assert len(series.data["m2"]) == 10
ts = datetime(2021, 1, 1, 2, 0, 0, tzinfo=pytz.UTC).timestamp()
ts = datetime(2024, 1, 1, 2, 0, 0, tzinfo=pytz.UTC).timestamp()
assert series.time[0] == ts


Expand Down
20 changes: 10 additions & 10 deletions tests/resources/sample.csv
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
time,commit,metric1,metric2
2021.01.01 3:00:00 +0100,aaa0,154023,10.43
2021.01.02 3:00:00 +0100,aaa1,138455,10.23
2021.01.03 3:00:00 +0100,aaa2,143112,10.29
2021.01.04 3:00:00 +0100,aaa3,149190,10.91
2021.01.05 3:00:00 +0100,aaa4,132098,10.34
2021.01.06 3:00:00 +0100,aaa5,151344,10.69
2021.01.07 3:00:00 +0100,aaa6,155145,9.23
2021.01.08 3:00:00 +0100,aaa7,148889,9.11
2021.01.09 3:00:00 +0100,aaa8,149466,9.13
2021.01.10 3:00:00 +0100,aaa9,148209,9.03
2024.01.01 3:00:00 +0100,aaa0,154023,10.43
2024.01.02 3:00:00 +0100,aaa1,138455,10.23
2024.01.03 3:00:00 +0100,aaa2,143112,10.29
2024.01.04 3:00:00 +0100,aaa3,149190,10.91
2024.01.05 3:00:00 +0100,aaa4,132098,10.34
2024.01.06 3:00:00 +0100,aaa5,151344,10.69
2024.01.07 3:00:00 +0100,aaa6,155145,9.23
2024.01.08 3:00:00 +0100,aaa7,148889,9.11
2024.01.09 3:00:00 +0100,aaa8,149466,9.13
2024.01.10 3:00:00 +0100,aaa9,148209,9.03

0 comments on commit d7eb144

Please sign in to comment.