[Python] Missing what argument

Discussão em 'Python' iniciado por Stack, Setembro 5, 2025.

  1. Stack

    Stack Membro Participativo

    Writing python code, according to everything I can find this should work and is how you do callable functions as arguments, but it is saying "_get_simple_test_result() missing 1 required positional argument: 'test'"

    def _get_simple_test_result(self, test: Test):
    return {"name": test.name, "suite": self.data.suites[test.parent].name, "status": test.status}

    def _aggregate_results_list(self, process_test: Callable[[Test], any] = _get_simple_test_result) -> list:
    results: list = []
    for test in self.data.tests.values():
    if self._test_matches_filter(test):
    results.append(process_test(test))
    return results


    Any input would be greatly appreciated. The argument is being passed to the process test function, not sure why it is saying it is missing.

    Continue reading...

Compartilhe esta Página