Closed tobywf closed 5 years ago
Thanks for the very detailed and helpful bug report. These aren't just warnings, these actually are plugin failures so no randomisation happens as a result.
Fixed in v1.0.4
Awesome, thank you!
I should have said that while doctests didn't get shuffled, normal tests were still shuffled, so I thought it wasn't a huge deal breaker. But happy to report 1.0.4 fixes it completely, thank you so much for the quick turn around!
When running tests against doctests, a warning is printed for these buckets:
package
,module
, andclass
. The bucketsglobal
,parent
,grandparent
, andnone
work fine. Seems to be because DoctestItems don't havemodule
orcls
attributes (see further down for output).I'm not hugely familiar with pytest, so I don't know if this needs fixing on their side. Poking around with ipdb, there doesn't seem to be any attribute that could be used instead.
A simple solution for now might be to simply point out that some buckets aren't available when running against doctests in the pytest-random-order documentation, and to leave the warning as is.
I've come up with a minimal working example to reproduce, I'm using
Python 3.7.1, pytest-4.0.1, py-1.7.0, pluggy-0.8.0
andrandom-order-1.0.3
. Let me know if you need anything else!foo.py
:Inside fresh virtualenv, using
class
in this case: