Skip to content

Commit

Permalink
Change arg order to preserve backward compatibility and skip test whe…
Browse files Browse the repository at this point in the history
…n xmllint not available
  • Loading branch information
tomdonaldson committed Oct 21, 2024
1 parent 6716f67 commit 3b1e2bd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
10 changes: 3 additions & 7 deletions astropy/io/votable/tests/test_schema_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,23 +58,19 @@
]


@pytest.mark.skipif(sys.platform.startswith("win"), reason="Cannot test on Windows")
@pytest.mark.parametrize(
"votable_file,schema_version,expected_return_code,expected_msg_re", test_cases
)
def test_schema_versions(
votable_file, schema_version, expected_return_code, expected_msg_re
):
"""Test that xmllint gives expected results for the given file and schema version."""

# We need xmllint so won't try with Windows.
if sys.platform.startswith("win"):
return

try:
rc, stdout, stderr = validate_schema(votable_file, schema_version)
except OSError:
# If xmllint is not installed, we want the test to pass anyway
return
# If xmllint is not installed, we want to skip the test
pytest.skip("xmllint is not available so will not do schema validation")

assert rc == expected_return_code
if rc == 3:
Expand Down
2 changes: 1 addition & 1 deletion astropy/io/votable/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -1843,10 +1843,10 @@ def __init__(
equinox=None,
epoch=None,
system=None,
refposition=None,
id=None,
config=None,
pos=None,
refposition=None,
**extra,
):
if config is None:
Expand Down

0 comments on commit 3b1e2bd

Please sign in to comment.