Rename unittest_file item to unittest

- constants.py: TYPE_UNITTEST_FILE → TYPE_UNITTEST, cmd "unittest_file" → "unittest"
- All Python files updated: test_item_unittest.py, test_set.py, test_init.py,
  terminal.py, report_export_txt.py, test_tree_item.py
- All .tum files updated (examples, validation, doc)
- Sphinx doc: unittest_file_test_item.rst → unittest_test_item.rst,
  all references updated

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-27 08:05:40 +02:00
parent a28e644621
commit 83411482b2
19 changed files with 35 additions and 35 deletions

View File

@@ -1,4 +1,4 @@
- unittest_file:
- unittest:
name: Test 5
test_file: dummy.py

View File

@@ -3,7 +3,7 @@ sequence: &endurance_test
!include endurance.tum
sequence:
- unittest_file:
- unittest:
name: Test 3
test_file: dummy.py
test_method: test_01_pass
@@ -11,6 +11,6 @@ sequence:
iterator: 10
steps:
*endurance_test
- unittest_file:
- unittest:
name: Test 4
test_file: dummy.py

View File

@@ -15,7 +15,7 @@ main:
- $(reference_1)
- $(reference_2)
report_show_success: true
- unittest_file:
- unittest:
name: Test 1
test_file: dummy.py
doc: |
@@ -23,7 +23,7 @@ main:
Voilà...
- sleep:
{name: Sleep between one and two, timeout: 10, dialog: true}
- unittest_file:
- unittest:
{name: Test 2, test_file: dummy.py,execute_on_stop: true}
- loop:
name: Cycle Temperature

View File

@@ -14,7 +14,7 @@ main:
key: report-key-2
stop_on_failure: True
steps:
- unittest_file:
- unittest:
name: unittest item
doc: |
The purpose of this unittest test item is to demonstrate
@@ -41,7 +41,7 @@ main:
param:
- 123
- unittest_file:
- unittest:
name: Unittest item
test_file: dummy/dummy.py
test_method:
@@ -98,7 +98,7 @@ main:
name: Infine loop unittest step crashes
stop_on_failure: True
steps:
- unittest_file:
- unittest:
name: Unittest item
test_file: dummy/dummy.py
test_method:
@@ -243,7 +243,7 @@ main:
name: Infinite loop
skipped: True
steps:
- unittest_file:
- unittest:
name: Unittest item
test_file: dummy/dummy.py
test_method: test_01_pass

View File

@@ -9,7 +9,7 @@ main:
name: Test Sample number one
version: 0.1
steps:
- unittest_file:
- unittest:
name: Unittest item
test_file: dummy/unittest_str.py
doc: Unittest test
@@ -88,7 +88,7 @@ main:
name: cycle item
iterator : 3
steps:
- unittest_file:
- unittest:
name: Unittest item
test_file: dummy/dummy.py
test_method: test_01_pass
@@ -99,7 +99,7 @@ main:
name: cycle item
iterator : 3
steps:
- unittest_file:
- unittest:
name: Unittest item
test_file: dummy/dummy.py
test_method: test_01_pass

View File

@@ -75,7 +75,7 @@ a tooltip on the test row.
name: Test example
steps:
- unittest_file:
- unittest:
name: unittest item
doc: |
The purpose of this unittest test item is to demonstrate
@@ -93,4 +93,4 @@ See illustration in :numref:`Figure %s<doc-illustration>`.
Unittest
^^^^^^^^^
For ``unittest_file`` type test items, the python docstring of the test method is used as documentation.
For ``unittest`` type test items, the python docstring of the test method is used as documentation.

View File

@@ -10,7 +10,7 @@ This element is of the following form:
name: Group Item
condition: <| "$(OS)" == "Linux" |>
steps:
- unittest_file:
- unittest:
test_file: test_prod_alpha_13.py
test_method:
...

View File

@@ -33,7 +33,7 @@ if not provided is given in the table as well.
| | | It depends on the test item to take it |
| | | into account or not. |
| | | For example it makes sense to use it |
| | | for ``unittest_file`` test type |
| | | for ``unittest`` test type |
| | | because it can contain many sub-tests, |
| | | but not for sleep test type. |
| | | In cycles, it means that the child |

View File

@@ -12,7 +12,7 @@ This element is of the following form:
name: Cycle Temperature
iterator: 10
steps:
- unittest_file:
- unittest:
test_file: test_prod_rio6_8093.py
- py_func:
name: function test item

View File

@@ -1,15 +1,15 @@
**unittest_file** test item
**unittest** test item
============================================================
unittest_file test item allows the execution of unittest test script which
unittest test item allows the execution of unittest test script which
is part of python standard libraries.
The tum file prototype is as followed:
.. code-block:: yaml
:caption: ``unittest_file`` test item usage example
:caption: ``unittest`` test item usage example
- unittest_file:
- unittest:
name: unitTest test item
test_file: unitTestScript.py
test_method:
@@ -23,7 +23,7 @@ Beside common test items attributes, unittest test item has specific attribute,
* ``test_file``: it is the name (and eventually path) of the unittest file
to be processed.
* ``test_method``: it is an optional unittest_file test sub-item. If one or more
* ``test_method``: it is an optional unittest test sub-item. If one or more
elements are present, the unittest python script file is parsed and only
the corresponding methods are included in the test tree. Otherwise, all
the test methods are included in the test tree.
@@ -78,4 +78,4 @@ Here is an example how to use the console module from python ``unittest``.
@classmethod
def tearDownClass(cls):
cls.consA0.close()
cls.consA0.close()

View File

@@ -259,7 +259,7 @@ step list attributes.
test_items/report_test_item.rst
test_items/run_test_item.rst
test_items/sleep_test_item.rst
test_items/unittest_file_test_item.rst
test_items/unittest_test_item.rst