@@ -0,0 +1,2154 @@
+from __future__ import absolute_import, division, print_function%0A%0Aimport os%0A%0Aimport procrunner%0Aimport pytest%0Aimport xia2.Test.regression%0A%0Aexpected_data_files = %5B%0A    'AUTOMATIC_DEFAULT_free.mtz',%0A    'AUTOMATIC_DEFAULT_scaled_WAVE2.sca',%0A    'AUTOMATIC_DEFAULT_scaled_unmerged_WAVE1.sca',%0A    'AUTOMATIC_DEFAULT_scaled_unmerged_WAVE2.sca',%0A    'AUTOMATIC_DEFAULT_scaled_WAVE1.sca',%0A    'AUTOMATIC_DEFAULT_scaled_unmerged_WAVE1.mtz',%0A    'AUTOMATIC_DEFAULT_scaled_unmerged_WAVE2.mtz',%0A%5D%0A%0A@pytest.fixture(scope=%22session%22)%0Adef data_dir(xia2_regression_build):%0A  data_dir = os.path.join(xia2_regression_build, %22test_data%22, %22mad_example%22)%0A  if not os.path.exists(data_dir):%0A    pytest.skip('MAD example data not found. Please run xia2_regression.fetch_test_data first')%0A  return data_dir%0A%0A@pytest.mark.regression%0Adef test_dials(data_dir, tmpdir, ccp4):%0A  command_line = %5B%0A      'xia2', 'pipeline=dials', 'nproc=1', 'njob=2', 'mode=parallel',%0A      'trust_beam_centre=True',%0A      data_dir,%0A  %5D%0A  with tmpdir.as_cwd():%0A    result = procrunner.run(command_line)%0A  success, issues = xia2.Test.regression.check_result(%0A      'mad_example.dials', result, tmpdir, ccp4, expected_data_files=expected_data_files%0A  )%0A  assert success, issues%0A%0A%0A@pytest.mark.regression%0Adef test_xds(data_dir, tmpdir, ccp4, xds):%0A  command_line = %5B%0A      'xia2', 'pipeline=3di', 'nproc=1', 'njob=2', 'mode=parallel',%0A      'trust_beam_centre=True',%0A      data_dir,%0A  %5D%0A  with tmpdir.as_cwd():%0A    result = procrunner.run(command_line)%0A  success, issues = xia2.Test.regression.check_result(%0A      'mad_example.xds', result, tmpdir, ccp4, xds, expected_data_files=expected_data_files,%0A  )%0A  assert success, issues%0A%0A%0A@pytest.mark.regression%0Adef test_xds_ccp4a(data_dir, tmpdir, ccp4, xds):%0A  command_line = %5B%0A      'xia2', 'pipeline=3di', 'nproc=1', 'njob=2', 'mode=parallel',%0A      'trust_beam_centre=True', 'scaler=ccp4a',%0A      data_dir,%0A  %5D%0A  with tmpdir.as_cwd():%0A    result = procrunner.run(command_line)%0A  success, issues = xia2.Test.regression.check_result(%0A      'mad_example.ccp4a', result, tmpdir, ccp4, xds, expected_data_files=expected_data_files,%0A  )%0A  assert success, issues%0A

Add MAD regression test, #228