Skip to content

Commit ab6221f

Browse files
committed
fix test depending on file ordering
1 parent 252bca8 commit ab6221f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

doc/changes.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@ desidatamodel Change Log
55
23.6 (unreleased)
66
-----------------
77

8-
* Add ``DESINAME`` description (PR #199).
8+
* Add ``DESINAME`` description (PR `#189`_).
99
* Update definition of ``ZCAT_NSPEC`` (PR `#187`_).
1010
* Add note about equivalent width values in ``fuji`` and ``guadalupe`` (PR `#181`_).
1111
* Add note about units in FITS files (PR `#178`_).
1212

1313
.. _`#178`: https://github.com/desihub/desidatamodel/pull/178
1414
.. _`#181`: https://github.com/desihub/desidatamodel/pull/181
1515
.. _`#187`: https://github.com/desihub/desidatamodel/pull/187
16+
.. _`#189`: https://github.com/desihub/desidatamodel/pull/189
1617

1718
23.1 (2023-06-12)
1819
-----------------

py/desidatamodel/test/test_check.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,14 @@ def test_files_to_regexp_with_missing_filetype(self, mock_type):
119119
@patch.object(DataModel, '_expectedtypes', ('foo', 'bar'))
120120
def test_files_to_regexp_with_bad_filetype(self):
121121
"""Test compilation of regular expressions; log unusual file type.
122+
123+
Note that depending on the order in which the directory below is read,
124+
the unexpected file type may be fits or json.
122125
"""
123126
root = os.path.join(os.environ[DM], 'doc', 'DESI_SPECTRO_DATA')
124127
files = scan_model(root)
125128
foo = files[0].get_regexp(root)
126-
self.assertLog(log, -1, "Unusual file type, json, detected for {0}!".format(files[0].filename))
129+
self.assertLog(log, -1, "Unusual file type, %s, detected for %s!" % (files[0].filetype, files[0].filename))
127130

128131
def test_get_regexp_filesize(self):
129132
"""Test extraction of file size from data model documents.

0 commit comments

Comments
 (0)