preCICE v3.1.2
Loading...
Searching...
No Matches
Functions | Variables
createTest Namespace Reference

Functions

 is_precice_root (dir)
 
 find_precice_root ()
 
 locateTemplate (filepath)
 
 dirToSuite (dir)
 
 checkTestSuite (arg)
 
 checkTestName (arg)
 
 testarg (arg)
 
 generateTestSource (name, suite, filepath)
 
 generateTestSourceFromExisting (name, suite, filepath, existingSource)
 
 generateTestConfig (name, suite, filepath)
 
 main ()
 

Variables

list ABBREVIATIONS = ["MPI", "QN", "RBF", "NN", "NP"]
 
str PRECICE_TEST_BODY
 

Function Documentation

◆ checkTestName()

createTest.checkTestName ( arg)

Definition at line 76 of file createTest.py.

◆ checkTestSuite()

createTest.checkTestSuite ( arg)

Definition at line 51 of file createTest.py.

◆ dirToSuite()

createTest.dirToSuite ( dir)
Takes a kebab-case-directory and transforms it to a CamelCaseDirectory.
Abbreviations defined above will be all upper case.

Definition at line 35 of file createTest.py.

◆ find_precice_root()

createTest.find_precice_root ( )

Definition at line 16 of file createTest.py.

Here is the call graph for this function:

◆ generateTestConfig()

createTest.generateTestConfig ( name,
suite,
filepath )

Definition at line 200 of file createTest.py.

◆ generateTestSource()

createTest.generateTestSource ( name,
suite,
filepath )

Definition at line 150 of file createTest.py.

◆ generateTestSourceFromExisting()

createTest.generateTestSourceFromExisting ( name,
suite,
filepath,
existingSource )

Definition at line 173 of file createTest.py.

◆ is_precice_root()

createTest.is_precice_root ( dir)

Definition at line 11 of file createTest.py.

◆ locateTemplate()

createTest.locateTemplate ( filepath)

Definition at line 26 of file createTest.py.

◆ main()

createTest.main ( )

Definition at line 207 of file createTest.py.

Here is the call graph for this function:

◆ testarg()

createTest.testarg ( arg)
Checks the given test argument and computes:
- the location as pathlib.PurePath
- the suites as a list of suite names
- the name of the test

Definition at line 93 of file createTest.py.

Here is the call graph for this function:

Variable Documentation

◆ ABBREVIATIONS

list createTest.ABBREVIATIONS = ["MPI", "QN", "RBF", "NN", "NP"]

Definition at line 32 of file createTest.py.

◆ PRECICE_TEST_BODY

str createTest.PRECICE_TEST_BODY
Initial value:
1= """{
2 PRECICE_TEST(TODO);
3
4 // Implement your test here.
5 BOOST_TEST(false);
6 precice::Participant interface(context.name, context.config(), context.rank, context.size);
7
8 std::vector<VertexID> vertexIDs;
9
10 if (context.isNamed(TODO)) {
11 auto meshID = interface.getMeshID(TODO);
12 auto dataID = interface.getDataID(TODO, meshID);
13
14 std::vector<double> coords;
15
16 interface.setMeshVertices(meshID, TODO, coords.data(), vertexIDs.data());
17 } else {
18 }
19}
20"""

Definition at line 128 of file createTest.py.