Repository navigation
Simplify --splinter-headless - #123
Conversation
|
Sorry @bubenkoff, I don't have time to check this and the possible incompatibilities that may arise. |
|
I doubt there's a side effect. Here's two examples of
As for this project in particular: pytest-splinter defaults to False for headless (as a user would probably expect) It's really unintuitive to pass true/false to an option when the default behavior is false. There are corner cases (as always), but nothing is stopping them from writing their own option (e.g. |
|
This is behavior splinter should use by default. I think we should merge this. There's no point in |
|
Hi @youtux @bubenkoff, checking in, just rebased. The reason I stand behind this is it's simpler. Omission of the flag generally implies falsiness. Going by the https://en.wikipedia.org/wiki/Principle_of_least_astonishment. There's no point in At this point I already written my own If it's not okay to put in it's okay to close this. |
|
@bubenkoff Doing so now. |
6eedc24 to
c07d227
Compare
|
@bubenkoff Done |
5e84e97 to
6d92c5b
Compare
Not entering --splinter-headless infers False (this is backed by default values in pytest-splinter and probably user intuition). Entering --headless implies the user wants to run in headless mode.
Without argument, behavior is unchanged. `--splinter-headless` without arguments defaults to 'true'. Optionally false or true can be passed.
6d92c5b to
ef8208d
Compare
|
@bubenkoff Better now? |
|
please squash & merge |
It feels a bit strange doing true/false for a headless option.
It could be my own aesthetic / tastes.
argparsehas'store_true'for cases like this (see docs):So
--headlesssets it toTrue.I can't think of a case where a user would want to accept False considering the default behavior is that, but if they did, they can always add their own option via
pytest_addoption)Not entering --splinter-headless infers False (this is backed by default values in pytest-splinter and probably user intuition). Entering --headless implies the user wants to run in headless mode.