Skip to content

Commit

Permalink
Hit uncovered file check.
Browse files Browse the repository at this point in the history
  • Loading branch information
delucchi-cmu committed Oct 5, 2023
1 parent 287374f commit 86f1112
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/hipscat_import/catalog/test_file_readers.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ def test_unknown_file_type():
get_file_reader("unknown")


def test_file_exists(small_sky_dir):
"""File reader factory method should fail for missing files or directories"""
with pytest.raises(FileNotFoundError, match="File not found"):
next(CsvReader().read("foo_not_really_a_path"))
with pytest.raises(FileNotFoundError, match="Directory found at path"):
next(CsvReader().read(small_sky_dir))


def test_csv_reader(small_sky_single_file):
"""Verify we can read the csv file into a single data frame."""
total_chunks = 0
Expand Down

0 comments on commit 86f1112

Please sign in to comment.