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

Improve unit test coverage for v2/snap.py #132

Merged
merged 33 commits into from
Sep 18, 2024
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
eb8e315
Add coverage to error branch of Snap._snap_daemons
james-garner-canonical Sep 5, 2024
c7a0a52
Add coverage for Snap.logs under test_can_run_snap_daemon_commands
james-garner-canonical Sep 5, 2024
b08c271
Add coverage to error branch of Snap.connect
james-garner-canonical Sep 5, 2024
a070cb4
Add coverage for Snap.restart under test_can_run_snap_daemon_commands
james-garner-canonical Sep 5, 2024
3d7cb8d
Complete branch coverage in Snap.ensure
james-garner-canonical Sep 5, 2024
1d09be3
Add test to cover Snap.unset
james-garner-canonical Sep 5, 2024
f17bd9c
Add test for Snap.get (tests pass)
james-garner-canonical Sep 5, 2024
8a2a48d
Complete branch coverage for Snap._refresh
james-garner-canonical Sep 5, 2024
b839ddd
Add file level pyright directive to test_snap.py
james-garner-canonical Sep 6, 2024
ca7cf22
Test strip resulting in an empty string when loading snaps
james-garner-canonical Sep 6, 2024
67f13d9
Add test for when snapd not installed
james-garner-canonical Sep 6, 2024
8642aa4
Test snap cache initialised automatically
james-garner-canonical Sep 6, 2024
4104e4b
Test snap map loading deferred if catalog not populated
james-garner-canonical Sep 6, 2024
2f9e9d7
Add test cases for behaviour of loaded snap cache
james-garner-canonical Sep 6, 2024
5cf1c0b
Ensure custom __repr__ etc of various objects do not raise errors
james-garner-canonical Sep 6, 2024
af115aa
Assert setting state to current doesn't call subprocess
james-garner-canonical Sep 6, 2024
b8d95a5
Fix: revision should be a string
james-garner-canonical Sep 6, 2024
b2befeb
Test non-covered internal paths of socket client
james-garner-canonical Sep 6, 2024
ec806bd
Cover additional paths when running snap commands
james-garner-canonical Sep 6, 2024
cd21ab0
Cover both failure paths when running snap commands
james-garner-canonical Sep 6, 2024
417722c
Cover devmode case in existing tests
james-garner-canonical Sep 6, 2024
878d5d8
Cover error cases when using local install
james-garner-canonical Sep 6, 2024
efa9990
Test reading hold state of snaps
james-garner-canonical Sep 6, 2024
331816a
Use a decorator instead of with statement
james-garner-canonical Sep 17, 2024
9308b71
Factor useful tests from test_internals into individual tests
james-garner-canonical Sep 17, 2024
fe4b999
Remove spurious test
james-garner-canonical Sep 17, 2024
41d550f
Rename cache placeholder to reflect it's job
james-garner-canonical Sep 17, 2024
0c35f32
Document reason for raising error
james-garner-canonical Sep 17, 2024
4ca072d
Document some tests added in this branch
james-garner-canonical Sep 17, 2024
65ebb75
Remove test of overly specific implementation details
james-garner-canonical Sep 17, 2024
2a41ea3
Document the test for the Snap.get method
james-garner-canonical Sep 17, 2024
2e9b3bf
Add pyright ignore directive
james-garner-canonical Sep 17, 2024
12310eb
Add periods and newlines to make ruff happy
james-garner-canonical Sep 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Loading