Skip to content

Commit

Permalink
Add symmetry test for excluding images
Browse files Browse the repository at this point in the history
  • Loading branch information
jbeilstenedmands committed Nov 14, 2019
1 parent 8a146d0 commit f1dbd4b
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions test/command_line/test_symmetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,19 +85,21 @@ def test_symmetry_basis_changes_for_C2(tmpdir):
)


def test_symmetry_with_absences(dials_regression, tmpdir):
@pytest.mark.parametrize("option", ["", "exclude_images=0:1500:1800"])
def test_symmetry_with_absences(dials_regression, tmpdir, option):
"""Simple test to check that dials.symmetry, with absences, completes"""

result = procrunner.run(
[
"dials.symmetry",
os.path.join(dials_regression, "xia2-28", "20_integrated_experiments.json"),
os.path.join(dials_regression, "xia2-28", "20_integrated.pickle"),
os.path.join(dials_regression, "xia2-28", "25_integrated_experiments.json"),
os.path.join(dials_regression, "xia2-28", "25_integrated.pickle"),
],
working_directory=tmpdir,
)
cmd = [
"dials.symmetry",
os.path.join(dials_regression, "xia2-28", "20_integrated_experiments.json"),
os.path.join(dials_regression, "xia2-28", "20_integrated.pickle"),
os.path.join(dials_regression, "xia2-28", "25_integrated_experiments.json"),
os.path.join(dials_regression, "xia2-28", "25_integrated.pickle"),
]
if option:
cmd.append(option)

result = procrunner.run(cmd, working_directory=tmpdir)
assert not result.returncode and not result.stderr
assert tmpdir.join("symmetrized.refl").check()
assert tmpdir.join("symmetrized.expt").check()
Expand Down

0 comments on commit f1dbd4b

Please sign in to comment.