Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check Registry against refl/expt files #650

Merged
merged 2 commits into from
Jul 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions newsfragments/650.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Format classes are now tested against invalid binary data with dials-data, for when dials-regression is not present.
12 changes: 12 additions & 0 deletions tests/format/test_format.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from __future__ import annotations

from dxtbx.format import Registry


def test_reading_refl_failure(dials_data):
test_data = dials_data("centroid_test_data", pathlib=True)

# Without dials_regression, none of the dials-data tests check for this "invalid binary data" case
assert Registry.get_format_class_for_file(test_data / "indexed.refl") is None
# Check .expt while here
assert Registry.get_format_class_for_file(test_data / "indexed.expt") is None
Loading