[pytest-dev] on opening up single character options via a registry

Floris Bruynooghe flub at devork.be
Sun Aug 6 16:11:39 EDT 2017


RonnyPfannschmidt <opensource at ronnypfannschmidt.de> writes:
> as it pains me that we sneakily call private methods to use single
> character options in xdist&co,
> i propose to open up single character options to other plugins by means
> of a registry,

What's wrong with the stance that this was a historical mistake and
should never have been allowed?  It's a lot easier to handle, i.e. do
nothing but apologise to plugin devs who want to use short options.

> so that plugins that have a registered single character will be able to
> use it in py.test versions that have that association saved
>
> we could even go as far as making the registry a extra pytest plugin
> that can be updated out of band from pytest itself

A plugin is probably the best way to go here.  It also means we'd be
exposing the register functionality via hooks which is cute as it allows
alternate registries to appear.  Your definition of cute may obviously
vary, but I think this would work out fine and no chaos would ensue.


Cheers,
Floris


More information about the pytest-dev mailing list