Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sample.csv dates #12

Merged
merged 1 commit into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading