forked from cctbx/dxtbx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check Registry against refl/expt files (cctbx#650)
This was previously done implicitly, but only when dials_regression was present. This makes the test explicit, and works with dials-data (so that it will work on e.g. CI with restricted access to test cases).
- Loading branch information
Showing
2 changed files
with
13 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |