Skip to content
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

Discourage the use of true/falsevalue for boolean test parameters #12706

Merged
merged 1 commit into from Oct 28, 2021

Conversation

bernt-matthias
Copy link
Contributor

xref galaxyproject/tools-iuc#4053 (comment)

Because it gives a stronger test.

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

@github-actions github-actions bot added this to the 22.01 milestone Oct 14, 2021
@mvdbeek
Copy link
Member

mvdbeek commented Oct 14, 2021

Do I understand this correctly that you want to discourage truevalue/falsevalue in general ? I strongly disagree about this, but the link isn't sufficient for me to understand why using truevalue/falsevalue results in weak tests and if that couldn't be improved.

@bernt-matthias
Copy link
Contributor Author

Actually I just wanted to bring the discussion with @wm75 where it belongs :)

But I tend to agree with him .. but I do not have a really strong opinion:

Using just true and false is closer to what happens if the user checks or unchecks the boolean. So one may say that you test what the label of the boolean says (I'm always confused by double negatives, i.e. if the label contains a "do not" and the argument also contains something like "--no-...".)

Another reason might be this ambiguity: <param name="boolean" type="boolean" truevalue="false" falsevalue="true" />

@wm75
Copy link
Contributor

wm75 commented Oct 14, 2021

@mvdbeek This is not about the use of truevalue/falsevalue for boolean params, it's about using those literal values in tests instead of "true"/"false".

@mvdbeek mvdbeek merged commit 7ac665a into galaxyproject:dev Oct 28, 2021
@github-actions
Copy link

This PR was merged without a "kind/" label, please correct.

@bernt-matthias bernt-matthias deleted the topic/xsd-test-bool branch March 14, 2022 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants