pytest-random-order icon indicating copy to clipboard operation
pytest-random-order copied to clipboard

process_failed_first_last_failed → NotImplementedError

Open Natim opened this issue 5 years ago • 5 comments

I often encounter this exception, especially when I previously ran pytest and a syntax error prevented it to run.

File "/usr/local/lib/python3.7/site-packages/random_order/plugin.py", line 60, in pytest_collection_modifyitems
INTERNALERROR>     process_failed_first_last_failed(session, config, items)
INTERNALERROR>   File "/usr/local/lib/python3.7/site-packages/random_order/cache.py", line 28, in process_failed_first_last_failed
INTERNALERROR>     raise NotImplementedError()
INTERNALERROR> NotImplementedError

Natim avatar Feb 26 '20 15:02 Natim

  1. Do you have a name of the test that caused this?
  2. Is that a method in a test class or a plain test function?

I'm asking because the issue is to do with the parsing of the name of the failed test in the cache plugin's lastfailed.

jbasko avatar Feb 26 '20 19:02 jbasko

Oh interesting. Let me dig that information for you.

Natim avatar Feb 27 '20 08:02 Natim

Is it possible that it is the case when pytest is run on tests that don't include the file in question? I run pytest 3 times in a raw and I have the issue if pytest is ran without the erroneous file.

Natim avatar Feb 27 '20 14:02 Natim

I just tried removing the test or test module that has last failed and then running with --last-failed and was not able to reproduce the error. If you could edit locally that raise NotImplementedError() line to include more information that would help. It's my bad to raise such an uninformative exception.

jbasko avatar Feb 29 '20 03:02 jbasko

Today I found the same bug on a project but it happened only once, very weird.

ssbarnea avatar Oct 13 '23 12:10 ssbarnea