Skip to content

Commit

Permalink
BF(TST): avoid validation of target schema (might be not yet released…
Browse files Browse the repository at this point in the history
…) in the test
  • Loading branch information
yarikoptic committed Feb 24, 2025
1 parent 68d92b2 commit a7f23fe
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion dandischema/tests/test_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,14 @@ def test_migrate_044(schema_dir: Path) -> None:
]

# if already the target version - we do not change it, and do not crash
newmeta_2 = migrate(newmeta, to_version=DANDI_SCHEMA_VERSION)
newmeta_2 = migrate(

Check warning on line 432 in dandischema/tests/test_metadata.py

View check run for this annotation

Codecov / codecov/patch

dandischema/tests/test_metadata.py#L432

Added line #L432 was not covered by tests
newmeta,
to_version=DANDI_SCHEMA_VERSION,
# to avoid possible crash due to attempt to download not yet
# released schema if we are still working within yet to be
# released version of the schema
skip_validation=True,
)
assert newmeta_2 == newmeta
assert newmeta_2 is not newmeta # but we do create a copy

Expand Down

0 comments on commit a7f23fe

Please sign in to comment.