pytest-dev / pytest-random-order

pytest plugin to randomise the order of tests with some control over the randomness
MIT License
65 stars 10 forks source link

not enabled by default #19

Closed eLRuLL closed 7 years ago

eLRuLL commented 7 years ago

I really think this shouldn't be enabled by default (as there are other ways to enable it by default on a pytest project), but instead offer to enable it.

Thanks

jbasko commented 7 years ago

One can equally make an argument that the plugin can be disabled in pytest.ini with addopts = -p no:random-order. Also I didn't find many other plugins that are not enabled after installing them. A quick text search over the home pages of featured plugins reveals that only pytest-twisted needs to be enabled. This plugin is also prominent in the report so a new developer will immediately notice its presence. It's actually part of a good plugin appeal that it doesn't require anything but a pip install. Anyway, thanks for taking the time to think about this and actually implement it, but I won't merge this.

eLRuLL commented 7 years ago

what about a disabling argument set as False (so it could be enabled by default). That way we can still control ourselves the way our tests run.

Check this question, as you can see, there is a problem with disabling the entire plugin with no:random-order, because later it can't be enabled on the command line. But, if we have a disabling command on the plugin, someone can set addopts = -p disable-random-order=false but still enable it on demand.