Skip to content

Commit

Permalink
Add test for #662
Browse files Browse the repository at this point in the history
Fixes #662 (though to be honest I was not able to reproduce it)
  • Loading branch information
mwcraig committed Jul 26, 2019
1 parent 3073c56 commit 2ee2898
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions ccdproc/tests/test_image_collection.py
Expand Up @@ -816,14 +816,18 @@ def test_image_collection_with_no_location(self, triage_setup):
#
# https://github.com/astropy/ccdproc/issues/374
#
# and fix the bug reported in
#
# https://github.com/astropy/ccdproc/issues/662
#
# Create a collection from a list of file names (which can include
# path as needed)

source_path = Path(triage_setup.test_dir)

# Put the first three files in source_path into temp_path below
# then create the image collection out of the three in temp_path and the
# rest in source_path.
# then create the image collection out of the three in temp_path and
# the rest in source_path.
source_files = [p for p in source_path.iterdir()]

move_to_temp = source_files[:3]
Expand Down Expand Up @@ -883,3 +887,10 @@ def test_image_collection_with_no_location(self, triage_setup):
assert set(file_paths) == set(ic.summary['file'])
assert set(file_paths) == set(ic.files)
assert set(file_paths) == set(ic.files_filtered(include_path=True))

# Spot check a couple of dtypes as a test for
# https://github.com/astropy/ccdproc/issues/662

assert ic.summary['extend'].dtype == 'bool'
assert ic.summary['naxis1'].dtype == 'int64'
assert ic.summary['exptime'].dtype == 'float64'

0 comments on commit 2ee2898

Please sign in to comment.