-
Notifications
You must be signed in to change notification settings - Fork 50
Simplify --splinter-headless #123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tony please resolve conflicts
@bubenkoff Doing so now. |
6eedc24
to
c07d227
Compare
@bubenkoff Done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please:
- fix the documentation
- add changelog record
- add authors record
also tests are broken with this
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.
argparse
has'store_true'
for cases like this (see docs):So
--headless
sets 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.