def test_to_shelxcde_sad_native(dials_data, run_in_tmpdir): input_mtz = dials_data("x4wide_processed").join( "AUTOMATIC_DEFAULT_scaled_unmerged.mtz") to_shelxcde.run( ["--sad", input_mtz.strpath, "--nat", input_mtz.strpath, "test"]) check_output(expected_sad_files + expected_native_files, expected_native_script)
def test_to_shelxcde_invalid_args_sad_mad(dials_data, run_in_tmpdir): input_mtz = dials_data("x4wide_processed").join( "AUTOMATIC_DEFAULT_scaled_unmerged.mtz") with pytest.raises(SystemExit): to_shelxcde.run( ["--sad", input_mtz.strpath, "--mad", input_mtz.strpath, "tmp"])
def test_to_shelxcde_missing_prefix(dials_data, run_in_tmpdir): input_mtz = dials_data("x4wide_processed").join( "AUTOMATIC_DEFAULT_scaled_unmerged.mtz") with pytest.raises(SystemExit): to_shelxcde.run(["--sad", input_mtz.strpath])
def test_to_shelxcde_missing_input_file(dials_data, run_in_tmpdir): with pytest.raises(SystemExit): to_shelxcde.run(["tmp"])
def test_to_shelxcde_invalid_label(dials_data, run_in_tmpdir): input_mtz = dials_data("x4wide_processed").join( "AUTOMATIC_DEFAULT_scaled_unmerged.mtz") with pytest.raises(ValueError): to_shelxcde.run( ["--sad", input_mtz.strpath, "--label", "invalid", "test"])
def test_to_shelxcde_invalid_input_file(dials_data, run_in_tmpdir): with pytest.raises(Sorry): to_shelxcde.run(["--sad", "invalid_file", "tmp"])