Skip to content

Commit

Permalink
pep8
Browse files Browse the repository at this point in the history
  • Loading branch information
megies committed Dec 21, 2022
1 parent 1b40d9f commit 8bbae00
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions obspy/clients/filesystem/tests/test_tsindex.py
Original file line number Diff line number Diff line change
Expand Up @@ -645,10 +645,12 @@ def test__get_leap_seconds_file(self):
database=database)

# test that a bad leap second file path raises an error
with pytest.raises(OSError, match="^No leap seconds file exists at.*$"):
with pytest.raises(OSError,
match="^No leap seconds file exists at.*$"):
Indexer(filepath, database=database,
leap_seconds_file="/some/bad/path/")
with pytest.raises(OSError, match="^No leap seconds file exists at.*$"):
with pytest.raises(OSError,
match="^No leap seconds file exists at.*$"):
indexer._get_leap_seconds_file("/some/bad/path/")

# test search
Expand Down Expand Up @@ -722,9 +724,11 @@ def test_build_file_list(self):
'IU/2018/001/IU.COLA.10.BHZ.2018.001_first_minute.mseed') in \
file_list[2]
# test that already indexed files (relative and absolute) get skipped.
with pytest.raises(OSError, match="^No unindexed files matching filename.*$"):
with pytest.raises(
OSError, match="^No unindexed files matching filename.*$"):
indexer.build_file_list(reindex=False, relative_paths=False)
with pytest.raises(OSError, match="^No unindexed files matching filename.*$"):
with pytest.raises(
OSError, match="^No unindexed files matching filename.*$"):
indexer.build_file_list(reindex=False, relative_paths=True)
# for this test mock an unindexed file ('data.mseed') to ensure that
# it gets added when reindex is True
Expand Down

0 comments on commit 8bbae00

Please sign in to comment.