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

New plainbox unittests (>0%) #675

Merged
merged 6 commits into from
Aug 22, 2023
Merged

New plainbox unittests (>0%) #675

merged 6 commits into from
Aug 22, 2023

Conversation

Hook25
Copy link
Collaborator

@Hook25 Hook25 commented Aug 22, 2023

Description

This PR aims to make every module in plainbox at least imported by the unittests. This allows tox, pytest and any other static analysis tool we may want to start using to analyze them.

I have used this occasion to try to produce some reasonable unittests, so that we get also some value more than just a plain include.

Resolved issues

This is part of: https://warthogs.atlassian.net/browse/CHECKBOX-740

Documentation

N/A

Tests

To run the tests run the following

$ cd checkbox/checkbox-ng/plainbox
$ pytest . -vvv

@codecov
Copy link

codecov bot commented Aug 22, 2023

Codecov Report

Merging #675 (f69c001) into main (a4416bb) will increase coverage by 27.21%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             main     #675       +/-   ##
===========================================
+ Coverage   31.46%   58.67%   +27.21%     
===========================================
  Files         302      103      -199     
  Lines       35156    14430    -20726     
  Branches     6141     2374     -3767     
===========================================
- Hits        11061     8467     -2594     
+ Misses      23572     5632    -17940     
+ Partials      523      331      -192     

see 204 files with indirect coverage changes

Copy link
Contributor

@kissiel kissiel left a comment

Choose a reason for hiding this comment

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

Awesome stuff! +1
Is this really everything that was needed to import all modules while testing?

@Hook25
Copy link
Collaborator Author

Hook25 commented Aug 22, 2023

this imports everything in plainbox but plainbox/impl/box.py because it is more trouble than it is worth fixing it I'm worried.

@Hook25 Hook25 merged commit 4245d8a into main Aug 22, 2023
12 of 16 checks passed
@Hook25 Hook25 deleted the new_plainbox_unittests branch August 22, 2023 10:48
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.

None yet

2 participants