Skip to content

Commit

Permalink
use different value for filename
Browse files Browse the repository at this point in the history
  • Loading branch information
braingram committed Sep 21, 2024
1 parent cb9313b commit 0cf4ec1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/roman_datamodels/maker_utils/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

NONUM = -999999
NOSTR = "?"
NOFN = "test"

MESSAGE = "This function assumes shape is 2D, but it was given at least 3 dimensions"

Expand Down
4 changes: 2 additions & 2 deletions src/roman_datamodels/maker_utils/_basic_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from roman_datamodels import stnode

from ._base import NOSTR
from ._base import NOFN, NOSTR


def mk_calibration_software_version(**kwargs):
Expand Down Expand Up @@ -36,7 +36,7 @@ def mk_filename(**kwargs):
-------
roman_datamodels.stnode.Filename
"""
return stnode.Filename(kwargs.get("filename", NOSTR))
return stnode.Filename(kwargs.get("filename", NOFN))


def mk_file_date(**kwargs):
Expand Down
4 changes: 2 additions & 2 deletions tests/test_stnode.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from roman_datamodels import maker_utils
from roman_datamodels import maker_utils as utils
from roman_datamodels import stnode, validate
from roman_datamodels.maker_utils._base import NONUM, NOSTR
from roman_datamodels.maker_utils._base import NOFN, NONUM, NOSTR
from roman_datamodels.testing import assert_node_equal, assert_node_is_copy, wraps_hashable

from .conftest import MANIFEST
Expand Down Expand Up @@ -375,7 +375,7 @@ def test_node_representation(model):
}
assert mdl.meta.model_type == model_types[type(mdl)]
assert mdl.meta.telescope == "ROMAN"
assert mdl.meta.filename == NOSTR
assert mdl.meta.filename == NOFN
elif isinstance(mdl, (datamodels.SegmentationMapModel, datamodels.SourceCatalogModel)):
assert mdl.meta.optical_element == "F158"
else:
Expand Down

0 comments on commit 0cf4ec1

Please sign in to comment.