Skip to content

[Bug] services.py line 345: TestCaseRunner receives unexpected environment keyword argument #155

Description

@weekment

Bug Description

When running a test case via the run API, the call fails because services.py line 345 passes an environment keyword argument to TestCaseRunner, but TestCaseRunner.__init__ in runner.py only accepts a single testcase parameter.

Root Cause

services.py line 345:

runner = TestCaseRunner(interface_case, environment=environment)

 runner.py   TestCaseRunner.__init__  :
def __init__(self, testcase: ApiTestCase):


Suggested Fix
Remove the  environment  parameter from the  TestCaseRunner  call in  services.py  line 345:
# Before:
runner = TestCaseRunner(interface_case, environment=environment)

# After:
runner = TestCaseRunner(interface_case)

The  environment  is already merged into  interface_case.config  by  _prepare_config  at line 341, so the runner does not need to receive it separately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions