Skip to content

Commit

Permalink
Add test for scan/imageset slicing inconsistency (#213)
Browse files Browse the repository at this point in the history
  • Loading branch information
rjgildea committed Aug 26, 2020
1 parent e1cea70 commit 3fad1e5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/test_imageset.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,3 +573,14 @@ def test_multi_panel(multi_panel, expected_panel_count, dials_regression):
== len(imageset.get_raw_data(0))
== expected_panel_count
)


@pytest.mark.xfail(
raises=OverflowError, reason="https://github.com/cctbx/dxtbx/issues/213"
)
def test_scan_imageset_slice_consistency(dials_data):
files = dials_data("centroid_test_data").listdir("*.cbf", sort=True)[1:]
expt = ExperimentListFactory.from_filenames(f.strpath for f in files)[0]
assert expt.scan[0:8] == expt.scan
# The following doesn't work, and expects expt.imageset[1:9]
assert expt.imageset[0:8] == expt.imageset

0 comments on commit 3fad1e5

Please sign in to comment.