Skip to content

Commit

Permalink
added config test
Browse files Browse the repository at this point in the history
  • Loading branch information
thusser committed Aug 7, 2024
1 parent 8533762 commit 1b6f7c8
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/robotic/scripts/test_cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,19 @@ async def test_else():
assert cases["2"].triggered is False
assert cases["3"].triggered is False
assert cases["else"].triggered is True


@pytest.mark.asyncio
async def test_config():
cases = {
1: DebugTriggerRunner(),
2: DebugTriggerRunner(),
3: DebugTriggerRunner(),
"else": DebugTriggerRunner(),
}
cr = CasesRunner("config['abc']", cases, configuration={"abc": 2})
await cr.run(None, None, None)
assert cases[1].triggered is False
assert cases[2].triggered is True
assert cases[3].triggered is False
assert cases["else"].triggered is False

0 comments on commit 1b6f7c8

Please sign in to comment.