Diff of /Tests/test_example.any [000000] .. [38ba34]

Switch to unified view

a b/Tests/test_example.any
1
//define = [
2
//    {'BM_ARM_RIGHT':'ON', 'BM_ARM_LEFT':'ON'},  # Test 1 with arms 
3
//    {'BM_ARM_RIGHT':'OFF', 'BM_ARM_LEFT':'OFF'}, # Test 2 without arms
4
//]
5
6
#define ANYBODY_PATH_OUTPUT "."
7
#include "../Application/Examples/StandingModel/StandingModel.Main.any"
8
9
Main = 
10
{
11
  AnyOperation& RunTest = Main.RunApplication;
12
};
13
14
15
16
17
/*
18
19
# Test Documentation: 
20
21
The test framework pytest is used to run tests. 
22
23
Test files are identified by prefixing `test_` to the file names. Such files 
24
will be collected automatically by the Pytest framework.
25
26
To run the test type the following at the command prompt:
27
28
> pytest
29
30
31
## Test specifications
32
33
The first part of the `test_xxx.any` can include specifications for the test framework. 
34
Things such as define and part statements or certain errors to ignore.
35
36
The specification section must be commented with //. The test will execute that part of 
37
the file as python code. So the code must be valid python code except for the leading //
38
39
40
### Specifying define statements:
41
42
The following specifications are supported:
43
44
* define 
45
* path
46
* expected_errors
47
* ignore_errors 
48
* expect_errors
49
50
51
// Note. Since this test example include a main file from another
52
// application it also alters the ANYBODY_PATH_MAINFILEDIR and 
53
// ANYBODY_PATH_MAINFILE preprocessor flags. 
54
//
55
// If these flags are important to the model they must be mocked by the
56
// test framework. This can be done by adding the following test directives
57
// to the top of the test file.
58
59
60
## 
61
62
//path = {'ANYBODY_PATH_MAINFILEDIR':'../Application/Examples/StandingModel',
63
//        'ANYBODY_PATH_MAINFILE':'../Application/Examples/StandingModel/StandingModel.Main.any' }
64
//
65
66
*/