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

tests/main/snap-info: use yaml.safe_load rather than yaml.load #11243

Merged
merged 2 commits into from
Jan 14, 2022

Conversation

bboozzoo
Copy link
Collaborator

@bboozzoo bboozzoo commented Jan 12, 2022

Update the test script to work correctly with latest releases of PyYAML, which
now require the Loader to be passed for non-safe load() functions, like so:

+ python3 check.py
Traceback (most recent call last):
  File "check.py", line 70, in <module>
    res = list(yaml.load_all(sys.stdin))
TypeError: load_all() missing 1 required positional argument: 'Loader'

Update the test script to work correctly with latest releases of PyYAML, which
now require the Loader to be passed for non-safe load() functions, like so:

+ python3 check.py
Traceback (most recent call last):
  File "check.py", line 70, in <module>
    res = list(yaml.load_all(sys.stdin))
TypeError: load_all() missing 1 required positional argument: 'Loader'

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
@bboozzoo bboozzoo added Simple 😃 A small PR which can be reviewed quickly Test Robustness labels Jan 12, 2022
Copy link
Contributor

@mvo5 mvo5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

Copy link
Contributor

@mardy mardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@codecov-commenter
Copy link

Codecov Report

Merging #11243 (e3b0c1f) into master (9cbabd6) will increase coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #11243   +/-   ##
=======================================
  Coverage   78.33%   78.33%           
=======================================
  Files         924      924           
  Lines      105374   105374           
=======================================
+ Hits        82545    82549    +4     
+ Misses      17688    17686    -2     
+ Partials     5141     5139    -2     
Flag Coverage Δ
unittests 78.33% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
cmd/snap/cmd_debug_state.go 70.18% <0.00%> (-0.46%) ⬇️
overlord/hookstate/hookmgr.go 75.32% <0.00%> (+0.64%) ⬆️
osutil/synctree.go 79.24% <0.00%> (+2.83%) ⬆️

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 9cbabd6...e3b0c1f. Read the comment docs.

@mvo5 mvo5 merged commit e8770fd into snapcore:master Jan 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Simple 😃 A small PR which can be reviewed quickly Test Robustness
Projects
None yet
4 participants