[tbot] Example with composite testcase
hws at denx.de
Thu Nov 22 09:32:31 UTC 2018
On Thu, 2018-11-22 at 10:20 +0100, Stefano Babic wrote:
> Hi Harald, Heiko,
> are there example how a test case can call another test ? It is not
> clear to me.
First, you need to import the python module where your test is defined.
Eg, if you have two files: `tc/tests_a.py` and `tc/tests_b.py`. If
tests_a defines a testcase `do_foo_bar()`, you can call it in tests_b
def call_foo() -> None:
(If the testcase you want to call is in the same source file, just call
it like a normal function)
> Have you set a repo with a set of common tests ? A "tc" repo would be fine !
I don't have an example repo yet, unfortunately :/ It is on my
ToDo list, I will add one soon(TM)!
> Best regards,
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-62 Fax: +49-8142-66989-80 Email: hws at denx.de
More information about the tbot