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

Fix cli bug about getting arguments["validator"]. #725

Merged
merged 3 commits into from
Aug 26, 2020

Conversation

willson-chen
Copy link
Contributor

As commented in #710 (comment).
By adjusting the position of arguments["validator"], we can solve this bug, but because arguments["validator"] is not processed in parse_args, it will cause the test_latest_validator_is_the_default test case to fail, so I deleted this test case.

@codecov
Copy link

codecov bot commented Aug 20, 2020

Codecov Report

Merging #725 into master will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #725      +/-   ##
==========================================
+ Coverage   96.01%   96.02%   +0.01%     
==========================================
  Files          17       17              
  Lines        2658     2667       +9     
  Branches      310      310              
==========================================
+ Hits         2552     2561       +9     
  Misses         87       87              
  Partials       19       19              
Impacted Files Coverage Δ
jsonschema/cli.py 96.94% <100.00%> (ø)
jsonschema/tests/test_cli.py 99.09% <100.00%> (+0.03%) ⬆️

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 756de12...dc50921. Read the comment docs.

@Julian
Copy link
Member

Julian commented Aug 20, 2020

Thanks! Much appreciated.

This does look likely that it fixes the bug, but we do need a test, both for the new bug (that we weren't ensuring the right validator was used), and also to preserve the test that as you say may need to move now from parse_args to elsewhere, that we use the latest draft when unspecified.

@willson-chen
Copy link
Contributor Author

Okay, next I will add some test cases.

@Julian Julian merged commit dc50921 into python-jsonschema:master Aug 26, 2020
@Julian
Copy link
Member

Julian commented Aug 26, 2020

Thanks, merged this one after fixing a few minor issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants