示例#1
0
def AssembleTestSuites():
    ''' Populates the test suites to run.

    Populates the test suites to run. At least, it should pupulate the suites:
    "small", "nighlty" and "all"

    Return
    ------

    suites: A dictionary of suites
        The set of suites with its test_cases added.
    '''

    suites = KratosUnittest.KratosSuites

    # Create a test suite with the selected tests (Small tests):
    smallSuite = suites['small']
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_model_part.TestModelPart]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_model_part_io.TestModelPartIO]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_materials_input.TestMaterialsInput]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_geometries.TestGeometry]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_kratos_parameters.TestParameters]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_linear_solvers.TestLinearSolvers]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_eigen_solvers.TestEigenSolvers]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_condition_number.TestConditionNumber]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_processes.TestProcesses]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_importing.TestImporting]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_connectivity_preserve_modeler.TestConnectivityPreserveModeler]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_model.TestModel]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_redistance.TestRedistance]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_levelset_convection.TestLevelSetConvection]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_variable_utils.TestVariableUtils]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_reorder.TestReorder]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_exact_integration.TestExactIntegration]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_gid_io.TestGidIO]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_vector_interface.TestVectorInterface]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_matrix_interface.TestMatrixInterface]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_restart.TestRestart]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_gid_io_gauss_points.TestGiDIOGaussPoints]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_skin_detection_process.TestSkinDetectionProcess]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_sparse_multiplication.TestSparseMatrixSum]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_sparse_multiplication.TestSparseMatrixTranspose]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_sparse_multiplication.TestSparseMatrixMultiplication]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_variable_component.TestVariableComponent]))
    smallSuite.addTest(
        test_variable_redistribution.VariableRedistributionTest(
            'testLinearFunction'))
    smallSuite.addTest(
        test_variable_redistribution.VariableRedistributionTest(
            'testSharpCorners'))
    smallSuite.addTest(
        test_variable_redistribution.VariableRedistributionTest('testVector'))
    smallSuite.addTest(
        test_variable_redistribution.VariableRedistributionTest(
            'testQuadratic'))
    smallSuite.addTest(
        test_variable_redistribution.VariableRedistributionTest(
            'testNodalArea'))

    # Create a test suite with the selected tests plus all small tests
    nightSuite = suites['nightly']
    nightSuite.addTests(smallSuite)

    # Create a test suite that contains all the tests:
    allSuite = suites['all']
    allSuite.addTests(nightSuite)  # already contains the smallSuite

    return suites
示例#2
0
def AssembleTestSuites():
    ''' Populates the test suites to run.

    Populates the test suites to run. At least, it should pupulate the suites:
    "small", "nighlty" and "all"

    Return
    ------

    suites: A dictionary of suites
        The set of suites with its test_cases added.
    '''

    suites = KratosUnittest.KratosSuites

    # Create a test suite with the selected tests (Small tests):
    smallSuite = suites['small']
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_calculate_distance_to_skin.TestCalculateDistanceToSkin]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_embedded_skin_mapping.TestEmbeddedSkinMapping]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_model_part.TestModelPart]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_model_part_io.TestModelPartIO]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_materials_input.TestMaterialsInput]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_geometries.TestGeometry]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_kratos_parameters.TestParameters]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_linear_solvers.TestLinearSolvers]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_eigen_solvers.TestEigenSolvers]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_condition_number.TestConditionNumber]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_processes.TestProcesses]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_properties.TestProperties]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_importing.TestImporting]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_connectivity_preserve_modeler.TestConnectivityPreserveModeler]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_model.TestModel]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_redistance.TestRedistance]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_levelset_convection.TestLevelSetConvection]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_variable_utils.TestVariableUtils]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_reorder.TestReorder]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_exact_integration.TestExactIntegration]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_gid_io.TestGidIO]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_vtk_output_process.TestVtkOutputProcess]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_vector_interface.TestVectorInterface]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_matrix_interface.TestMatrixInterface]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_restart.TestRestart]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_gid_io_gauss_points.TestGiDIOGaussPoints]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_skin_detection_process.TestSkinDetectionProcess]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_mortar_utilities.TestMortarUtilities]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_sparse_multiplication.TestSparseMatrixSum]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_sparse_multiplication.TestSparseMatrixTranspose]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_sparse_multiplication.TestSparseMatrixMultiplication]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_variable_component.TestVariableComponent]))
    smallSuite.addTest(
        test_variable_redistribution.VariableRedistributionTest(
            'testLinearFunction'))
    smallSuite.addTest(
        test_variable_redistribution.VariableRedistributionTest(
            'testSharpCorners'))
    smallSuite.addTest(
        test_variable_redistribution.VariableRedistributionTest('testVector'))
    smallSuite.addTest(
        test_variable_redistribution.VariableRedistributionTest(
            'testQuadratic'))
    smallSuite.addTest(
        test_variable_redistribution.VariableRedistributionTest(
            'testNodalArea'))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_object_printing.TestObjectPrinting]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_array_1d_interface.TestArray1DInterface]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_flags.TestFlags]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_time_discretization.TestTimeDiscretization]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases([
        test_python_generic_function_utility.TestPythonGenericFunctionUtility
    ]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_serializer.TestSerializer]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_file_logger.TestFileLogger]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_dofs.TestDofs]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_time_averaging.TimeAveragingProcessTests]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_scipy_conversion_tools.TestScipyConversionTools]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_linear_constraints.TestLinearMultipointConstraints]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_linear_constraints.TestLinearConstraints]))
    smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases([
        test_compare_elements_conditions.
        TestCompareElementsAndConditionsUtility
    ]))

    # Create a test suite with the selected tests plus all small tests
    nightSuite = suites['nightly']
    nightSuite.addTests(smallSuite)
    nightSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_calculate_distance_to_skin.TestCalculateDistanceToSkin]))
    nightSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases(
        [test_mortar_mapper.TestMortarMapperCore]))

    # Create a test suite that contains all the tests:
    allSuite = suites['all']
    allSuite.addTests(nightSuite)  # already contains the smallSuite

    return suites