[38ba34]: / Tests / test_example.any

Download this file

66 lines (41 with data), 1.7 kB

//define = [
//    {'BM_ARM_RIGHT':'ON', 'BM_ARM_LEFT':'ON'},  # Test 1 with arms 
//    {'BM_ARM_RIGHT':'OFF', 'BM_ARM_LEFT':'OFF'}, # Test 2 without arms
//]

#define ANYBODY_PATH_OUTPUT "."
#include "../Application/Examples/StandingModel/StandingModel.Main.any"

Main = 
{
  AnyOperation& RunTest = Main.RunApplication;
};




/*

# Test Documentation: 

The test framework pytest is used to run tests. 

Test files are identified by prefixing `test_` to the file names. Such files 
will be collected automatically by the Pytest framework.

To run the test type the following at the command prompt:

> pytest


## Test specifications

The first part of the `test_xxx.any` can include specifications for the test framework. 
Things such as define and part statements or certain errors to ignore.

The specification section must be commented with //. The test will execute that part of 
the file as python code. So the code must be valid python code except for the leading //


### Specifying define statements:

The following specifications are supported:

* define 
* path
* expected_errors
* ignore_errors 
* expect_errors


// Note. Since this test example include a main file from another
// application it also alters the ANYBODY_PATH_MAINFILEDIR and 
// ANYBODY_PATH_MAINFILE preprocessor flags. 
//
// If these flags are important to the model they must be mocked by the
// test framework. This can be done by adding the following test directives
// to the top of the test file.


## 

//path = {'ANYBODY_PATH_MAINFILEDIR':'../Application/Examples/StandingModel',
//        'ANYBODY_PATH_MAINFILE':'../Application/Examples/StandingModel/StandingModel.Main.any' }
//

*/