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

DISPATCH-1455: assertRaises and mutually_exclusive groups not working as expected in rhel6 #596

Closed
wants to merge 1 commit into from

Conversation

nicob87
Copy link
Contributor

@nicob87 nicob87 commented Oct 18, 2019

just to open the discussion, this is one way to fix it.

  • mutually_exclusive_groups, not working as expected in python2.6, so manually
    adding the functionality only for python_version < 2.7.
  • assertRaises also works different in python2.6, it expects more arguments.

@nicob87
Copy link
Contributor Author

nicob87 commented Oct 18, 2019

in rhel6 this is gonna fail because the error message is not exactly like this:

if "error: argument --all-entities: not allowed with argument -c/--connections" in str(e):                             

probably it will bit more like:

"error: argument --all-entities: not allowed with argument -c"

@kgiusti
Copy link
Contributor

kgiusti commented Oct 18, 2019

I would simply skip the test if python is 2.6. Would that be easier?

import sys

Then in the test
if sys.version_info[0] == 2 and sys.version_info[1] < 7:
self.skipTest("requires python >= 2.7")

taa daa!!!

@ganeshmurthy
Copy link
Contributor

Instead of skipping the test, we could test for the Python version and check for the appropriate message.

@ganeshmurthy
Copy link
Contributor

I have opened a JIRA to address this - https://issues.apache.org/jira/browse/DISPATCH-1455

…thon2.6.

mutually_exclusive_groups, not working as expected in python2.6, so manually
adding the functionality only for python_version < 2.7
@nicob87 nicob87 changed the title WIP: assertRaises and mutually_exclusive groups not working as expected in rhel6 DISPATCH-1455: assertRaises and mutually_exclusive groups not working as expected in rhel6 Oct 21, 2019
@nicob87
Copy link
Contributor Author

nicob87 commented Oct 21, 2019

Good! ok, based on the feedback, probably I will open a new PR with a different approach, just skipping, and/or testing the expected different behaviour and then we can compare and see what solution we like more.
PR linked with the Jira.

@ganeshmurthy
Copy link
Contributor

Good! ok, based on the feedback, probably I will open a new PR with a different approach, just skipping, and/or testing the expected different behaviour and then we can compare and see what solution we like more.
PR linked with the Jira.

Excellent. Yes, please close this PR and open a new one with what you said above. Thanks Nicolas.

@codecov-io
Copy link

Codecov Report

Merging #596 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #596      +/-   ##
==========================================
- Coverage   86.36%   86.36%   -0.01%     
==========================================
  Files          90       90              
  Lines       20484    20485       +1     
==========================================
  Hits        17691    17691              
- Misses       2793     2794       +1
Impacted Files Coverage Δ
src/router_core/agent_link.c 66.83% <0%> (-0.51%) ⬇️
src/iterator.c 89.17% <0%> (-0.17%) ⬇️
src/router_node.c 92.9% <0%> (-0.13%) ⬇️
src/message.c 90.99% <0%> (-0.1%) ⬇️
src/router_core/transfer.c 94.51% <0%> (+0.74%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2339c41...012ab96. Read the comment docs.

@nicob87 nicob87 closed this Oct 21, 2019
@nicob87 nicob87 deleted the nb-rhel6-argparse-issue branch October 30, 2019 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants