Skip to content

Commit

Permalink
restrict dev ASDF standard tests for older version in compatibility t…
Browse files Browse the repository at this point in the history
…ests
  • Loading branch information
braingram committed Mar 11, 2024
1 parent aedf156 commit e5237f0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions compatibility_tests/test_file_compatibility.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@
GENERATE_SCRIPT_PATH = Path(__file__).parent / "generate_file.py"
ASSERT_SCRIPT_PATH = Path(__file__).parent / "assert_file_correct.py"

# Starting at this version ndarray tag version 1.1.0 is supported
# this is required for asdf standard 1.6.0 or later
NDARRAY_1_1_0_ASDF_VERSION = Version("2.14.0")
NDARRAY_1_1_0_STANDARD_VERSION = AsdfVersion("1.6.0")


@contextmanager
def internet_temporarily_enabled(verbose=False):
Expand Down Expand Up @@ -185,6 +190,12 @@ def test_file_compatibility(asdf_version, env_path, tmp_path):
assert len(standard_versions) > 0

for standard_version in sorted(standard_versions):
# older versions of asdf reported support for 1.6.0 (the development
# version of the standard) yet did not support the tags in that
# version.
if standard_version >= NDARRAY_1_1_0_STANDARD_VERSION:
if asdf_version < NDARRAY_1_1_0_ASDF_VERSION:
continue
# Confirm that a file generated by the current version of the code
# can be read by the older version of the library.
if asdf_version >= MIN_VERSION_NEW_FILES:
Expand Down

0 comments on commit e5237f0

Please sign in to comment.