Skip to content

Commit

Permalink
Adjust timeframe in test cases
Browse files Browse the repository at this point in the history
Collocation end time is now inclusive instead of exclusive.
  • Loading branch information
olemke committed Nov 20, 2024
1 parent a56e9ec commit b3fa04f
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions typhon/tests/files/test_fileset.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ def test_tutorial(self, file_system):
# Should not find anything:
empty = list(
filesets["tutorial"].find(
"2017-12-31", "2018-01-01", no_files_error=False
"2017-12-31", "2017-12-31 23:59", no_files_error=False
))
assert not empty

Expand Down Expand Up @@ -525,7 +525,7 @@ def test_single(self, file_system):
# Should not find anything:
empty = list(
filesets["single"].find(
"2016-12-31", "2018-01-01", no_files_error=False
"2016-12-31", "2017-12-31 23:59", no_files_error=False
))
assert not empty

Expand Down Expand Up @@ -571,14 +571,14 @@ def test_sequence(self, file_system):
# Should not find anything:
empty = list(
filesets["sequence-placeholder"].find(
"2016-12-31", "2018-01-01", no_files_error=False
"2016-12-31", "2017-12-31 23:59", no_files_error=False
))
assert not empty

# Should find two files:
found_files = list(
filesets["sequence-placeholder"].find(
"2018-01-01", "2018-01-02",
"2018-01-01", "2018-01-01 23:59",
))

check = [
Expand All @@ -597,7 +597,7 @@ def test_sequence(self, file_system):
# Should find two files and should return them in two bins:
found_files = list(
filesets["sequence-placeholder"].find(
"2018-01-01", "2018-01-02", bundle="6h",
"2018-01-01", "2018-01-01 23:59", bundle="6h",
))

check = [
Expand Down Expand Up @@ -631,7 +631,7 @@ def test_logs(self, file_system, caplog):
))
assert ("Find files for sequence-placeholder "
"between 2018-01-01 00:00:00 and "
"2018-01-01 23:59:59") in caplog.text
"2018-01-02 00:00:00") in caplog.text
assert f"via file system" in caplog.text


Expand All @@ -650,14 +650,14 @@ def test_sequence_placeholder(self, file_system):
# Should not find anything:
empty = list(
filesets["sequence-placeholder"].find(
"2016-12-31", "2018-01-01", no_files_error=False
"2016-12-31", "2017-12-31 23:59", no_files_error=False
))
assert not empty

# Should find two files:
found_files = list(
filesets["sequence-placeholder"].find(
"2018-01-01", "2018-01-02",
"2018-01-01", "2018-01-01 23:59",
))

check = [
Expand All @@ -676,7 +676,7 @@ def test_sequence_placeholder(self, file_system):
# Should find two files and should return them in two bins:
found_files = list(
filesets["sequence-placeholder"].find(
"2018-01-01", "2018-01-02", bundle="6h",
"2018-01-01", "2018-01-01 23:59", bundle="6h",
))

check = [
Expand Down

0 comments on commit b3fa04f

Please sign in to comment.