epics-extensions/WeTest

macro badly supported in 'name' field: TypeError: can only concatenate str (not "dict") to str

Opened this issue · 0 comments

script:

macros:
  - MAJOR:  2
    MINOR:  0
    BUGFIX: 0
    test_name: "set speed for FPGA-EPICS communication"
    # user
    PV_P:   "SL-MPS-SBCT:MPS-SBCT:"
    PV:     "GenDriverScanSet"
    # user
    SPEED:  500 # ms

version: {major: "${MAJOR}", minor: "${MINOR}", bugfix: "${BUGFIX}"}

config:
  name:        "${test_name}"
  type:        functional
  prefix:      "${PV_P}"

tests:
  - name:     "${test_name}"
    commands:

      - name:       "set speed for FPGA-EPICS communication"
        setter:     ${PV}
        value:      "${SPEED}"

      - name:       "set speed for FPGA-EPICS communication: ${SPEED} sec" # <---- this line is the issue
        setter:     ${PV}
        value:      "${SPEED}"

      - name:       "set speed for FPGA-EPICS communication"
        setter:     ${PV}
        value:      "${SPEED}"

ourput:

$ ./temp.yml --no-gui --no-pv --force-play --propagate-macros
Validation of YAML scenario file: /.../temp.yml
Schema validation failed:
 - Value '{'set speed for FPGA-EPICS communication': '500 sec'}' is not of type 'str'. Path: '/tests/0/commands/1/name'.
Loaded 3 tests from `WeTest Suite`:
	- functional (ordered)  `set speed for FPGA-EPICS communication`
-----------------------
Ready to start testing.

Running    test-0-0-0    set speed for FPGA-EPICS communication: set speed for FPGA-EPICS communication
Success of test-0-0-0    (in 1.031s) 

Running    test-0-0-1    set speed for FPGA-EPICS communication: {'set speed for FPGA-EPICS communication': '500 sec'}
Success of test-0-0-1    (in 1.002s) 

Running    test-0-0-2    set speed for FPGA-EPICS communication: set speed for FPGA-EPICS communication
Success of test-0-0-2    (in 1.002s) 
----------------------------------------------------------------------
Ran 3 tests in 3.056s

OK
Done running tests.
Process run_and_report:
Traceback (most recent call last):
  File "/nix/store/jai8k78ynwg1681p6qw6drpb4cyvwccs-python3-3.9.18/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/iee/extensions/lib/python/pyepics-3.2.4-py2.7.egg/epics/multiproc.py", line 37, in run
    mp.Process.run(self)
  File "/nix/store/jai8k78ynwg1681p6qw6drpb4cyvwccs-python3-3.9.18/lib/python3.9/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/nix/store/pnkbr2dx35h9rz9zn3fgvcgvfr73smvs-python3.9-wetest-2.0.0rc1/lib/python3.9/site-packages/wetest/command_line.py", line 113, in wrapper
    func(*args, **kwargs)
  File "/nix/store/pnkbr2dx35h9rz9zn3fgvcgvfr73smvs-python3.9-wetest-2.0.0rc1/lib/python3.9/site-packages/wetest/command_line.py", line 688, in run_and_report
    export_pdf(
  File "/nix/store/pnkbr2dx35h9rz9zn3fgvcgvfr73smvs-python3.9-wetest-2.0.0rc1/lib/python3.9/site-packages/wetest/command_line.py", line 236, in export_pdf
    report.save()
  File "/nix/store/pnkbr2dx35h9rz9zn3fgvcgvfr73smvs-python3.9-wetest-2.0.0rc1/lib/python3.9/site-packages/wetest/report/generator.py", line 398, in save
    test["infos"].test_title + ": " + test["infos"].subtest_title,
TypeError: can only concatenate str (not "dict") to str
Exiting WeTest.