Skip to content

Failed to run Pytest with parameters #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
rcourivaud opened this issue Jun 18, 2024 · 0 comments
Open

Failed to run Pytest with parameters #11

rcourivaud opened this issue Jun 18, 2024 · 0 comments

Comments

@rcourivaud
Copy link

rcourivaud commented Jun 18, 2024

I try running pytest suites but I've an error :

INTERNALERROR>   File "/opt/test-runner/runner/__init__.py", line 50, in pytest_collection_modifyitems
INTERNALERROR>     items.sort(key=_sort_by_lineno)
INTERNALERROR>   File "/opt/test-runner/runner/__init__.py", line 48, in _sort_by_lineno
INTERNALERROR>     return TestOrder.lineno(test_id, source)
INTERNALERROR>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/opt/test-runner/runner/sort.py", line 94, in lineno
INTERNALERROR>     return cls._cache[test_id].lineno
INTERNALERROR>            ~~~~~~~~~~^^^^^^^^^
INTERNALERROR> KeyError: 'test_primes.py::test_isprime[prime_case0]'

The tests runs well locally but not with the python-grader. The grader works well with no parametrized pytest function.

I tried everything:

  1. Handle cache (remove, create)
  2. Upgrade pytest, pluggy
  3. Change the pytest parameters definition
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant