Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
mwcraig committed Mar 15, 2021
1 parent ee9ee1d commit 8b07299
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions ccdproc/tests/test_image_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -1100,3 +1100,19 @@ def test_filtered_collection_with_no_files(self, triage_setup):
ifc = ImageFileCollection(triage_setup.test_dir)

ifc_no_files = ifc.filter(object='really fake object')

@pytest.mark.parametrize('extensions', ('flubber', ['flubber']))
def test_user_specified_file_extensions(self, tmp_path, extensions):
# Test for #727, allowing user to specify fits
# extensions
ccd = CCDData(data=np.zeros([10, 10]), unit='adu')
num_files = 4
if len(extensions) == 1:
extension = extensions[0]
else:
extension = extensions
# Explicitly give the format for writing
_ = [ccd.write(tmp_path / f"ccd_{i}.{extension}", format='fits')
for i in range(num_files)]
ifc = ImageFileCollection(tmp_path, extensions=extensions)
assert len(ifc.summary) == num_files

0 comments on commit 8b07299

Please sign in to comment.