Skip to content

Commit

Permalink
fix test depending on file ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
weaverba137 committed Feb 7, 2024
1 parent 252bca8 commit ab6221f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion doc/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ desidatamodel Change Log
23.6 (unreleased)
-----------------

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

.. _`#178`: https://github.com/desihub/desidatamodel/pull/178
.. _`#181`: https://github.com/desihub/desidatamodel/pull/181
.. _`#187`: https://github.com/desihub/desidatamodel/pull/187
.. _`#189`: https://github.com/desihub/desidatamodel/pull/189

23.1 (2023-06-12)
-----------------
Expand Down
5 changes: 4 additions & 1 deletion py/desidatamodel/test/test_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,14 @@ def test_files_to_regexp_with_missing_filetype(self, mock_type):
@patch.object(DataModel, '_expectedtypes', ('foo', 'bar'))
def test_files_to_regexp_with_bad_filetype(self):
"""Test compilation of regular expressions; log unusual file type.
Note that depending on the order in which the directory below is read,
the unexpected file type may be fits or json.
"""
root = os.path.join(os.environ[DM], 'doc', 'DESI_SPECTRO_DATA')
files = scan_model(root)
foo = files[0].get_regexp(root)
self.assertLog(log, -1, "Unusual file type, json, detected for {0}!".format(files[0].filename))
self.assertLog(log, -1, "Unusual file type, %s, detected for %s!" % (files[0].filetype, files[0].filename))

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

0 comments on commit ab6221f

Please sign in to comment.