# Generate Test Data The directory `tests/test_data/ocse_subset` contains an autogenerated subset of the OCSE (ontology of control systems engineering) which is used as real world testing data. Originally the "real" OCSE data was used for testing. This had the advantage of avoiding double maintaince effort (OCSE and testing data) but led to increased runtimes of the test suite with the growing number of entities and statements in the OCSE. This is because the test data is loaded and unloaded multiple times to keep the tests (mostly) independent. To keep the test data small but avoid additional maintaince effort we now automatically extract the relevant entities and statements from the real ocse. ```bash pyirk -utd ``` Which entities (and objects) are relevant is specified in the `ocse_subset/templates` subdirectory of `testdata`. The syntax of the template files is as follows: ```python # ... insert_entities = [ # copy all physical lines which are part of the entity definition I9841["vector field"], I4236["mathematical expression"], # ... # copy all physical lines which are part of the respective context manager with__I9907.scope("setting"), with__I9907.scope("premise"), with__I9907.scope("assertion"), # ... # copy all physical lines which are part of the class or function definition class__IntegerRangeElement, def__create_person, # ... # insert the line as is beginning after 'raw__' raw__I4237["monovariate rational function"].add_method(p.create_evaluated_mapping, "_custom_call"), # ... ] ``` See also {ref}`sec_keys`. ## Update Test Data ``` pyirk --update-test-data ```