def test_discover(libtbx): with CustomRuntestsEnvironment(): from libtbx.test_utils.pytest import discover assert not discover()
"$D/structure_factors/direct/tests/tst_standard_xray.py", ["$D/refinement/tests/tst_weighting_schemes.py", "--fix_random_seeds"], "$D/refinement/constraints/tests/tst_lbfgs.py", "$B/refinement/constraints/tests/tst_reparametrisation", "$B/refinement/constraints/tests/tst_geometrical_hydrogens", "$B/refinement/constraints/tests/tst_special_position", "$D/refinement/constraints/tests/tst_reparametrisation.py", ["$D/refinement/constraints/tests/tst_constrained_structure.py", '--normal_eqns_solving_method=naive'], ["$D/refinement/constraints/tests/tst_constrained_structure.py", '--normal_eqns_solving_method=levenberg-marquardt'], ["$D/refinement/restraints/tests/tst_restraints.py", '--verbose', '--scatterers=5', '--resolution=0.2'], "$D/regression/tst_commandline_refine.py", "$D/regression/tst_commandline_anomrefine.py", ] + discover() # unstable test tst_list_expected_unstable = [ "$D/refinement/tests/tst_least_squares.py", ] def run(): build_dir = libtbx.env.under_build("smtbx") dist_dir = libtbx.env.dist_path("smtbx") test_utils.run_tests(build_dir, dist_dir, tst_list) if __name__ == '__main__': run()
from __future__ import division import libtbx.load_env from libtbx import test_utils from libtbx.test_utils.pytest import discover tst_list = [ # "$D/tests/tst_legacy.py", ["$D/tests/tst_legacy_mult.py", "1"] # ["$D/tests/tst_legacy_mult.py", "2"] ] + discover("i19") if (__name__ == "__main__"): build_dir = libtbx.env.under_build("i19") dist_dir = libtbx.env.dist_path("i19") test_utils.run_tests(build_dir, dist_dir, tst_list)
["$D/test/algorithms/indexing/tst_index.py", "8"], ["$D/test/algorithms/indexing/tst_index.py", "9"], ["$D/test/algorithms/indexing/tst_index.py", "10"], ["$D/test/algorithms/indexing/tst_index.py", "11"], ["$D/test/algorithms/indexing/tst_index.py", "12"], ["$D/test/algorithms/indexing/tst_index.py", "13"], ["$D/test/algorithms/indexing/tst_index.py", "14"], ["$D/test/algorithms/indexing/tst_index.py", "15"], ["$D/test/algorithms/indexing/tst_index.py", "16"], ["$D/test/algorithms/indexing/tst_index.py", "17"], ["$D/test/algorithms/indexing/tst_index.py", "18"], "$D/test/algorithms/indexing/tst_assign_indices.py", "$D/test/command_line/tst_refine_bravais_settings.py", #["$D/test/command_line/tst_discover_better_experimental_model.py", "1"], ["$D/test/command_line/tst_discover_better_experimental_model.py", "2"], ["$D/test/command_line/tst_discover_better_experimental_model.py", "3"], "$D/test/algorithms/indexing/tst_compare_orientation_matrices.py", "$D/test/algorithms/indexing/tst_symmetry.py", #"$D/scratch/rjg/unit_cell_refinement.py", ] + discover("dials") def run(): build_dir = libtbx.env.under_build("dials") dist_dir = libtbx.env.dist_path("dials") test_utils.run_tests(build_dir, dist_dir, tst_list) if __name__ == "__main__": run()
from __future__ import absolute_import, division, print_function from libtbx.test_utils.pytest import discover tst_list = discover() # To write tests for xia2: # 1. Test file should be named test_*.py # 2. Test methods should be named test_*() # 3. Nothing else needed. Rest happens by magic. # To run xia2 tests: # run 'pytest' inside xia2 directory # For more information see: # https://github.com/dials/dials/wiki/pytest