Skip to content

Tests: simplify and shorten test_metadata_eq_.py - #2017

Merged
lukpueh merged 1 commit into
theupdateframework:developfrom
MVrachev:fix-eq-tests
Jun 8, 2022
Merged

lukpueh merged 1 commit into
theupdateframework:developfrom
MVrachev:fix-eq-tests

Conversation

@MVrachev

@MVrachev MVrachev commented Jun 6, 2022

Copy link
Copy Markdown
Collaborator

Description of the changes being introduced by the pull request:

There is a lot of repetitive code inside test_metadata_eq_.py.
Remove it by using the decorator.

I am initializing the object instances in setUpClass instead of doing it
inside the test function in order to escape the need for
reinitialization of the instances on each attribute.

Signed-off-by: Martin Vrachev [email protected]

Please verify and check that the pull request fulfills the following
requirements
:

  • The code follows the Code Style Guidelines
  • Tests have been added for the bug fix or new feature
  • Docs have been added for the bug fix or new feature

@coveralls

coveralls commented Jun 6, 2022 •

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 2455618443

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 98.357%

Totals Coverage Status
Change from base Build 2453955245: 0.0%
Covered Lines: 1204
Relevant Lines: 1220

💛 - Coveralls

@lukpueh lukpueh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice simplifications!

Comment thread tests/test_metadata_eq_.py Resolved
Comment thread tests/test_metadata_eq_.py Resolved
Comment thread tests/test_metadata_eq_.py Resolved
Comment thread tests/test_metadata_eq_.py Resolved
Comment thread tests/test_metadata_eq_.py Resolved
Comment thread tests/test_metadata_eq_.py Resolved
Comment thread tests/test_metadata_eq_.py Resolved
@lukpueh lukpueh mentioned this pull request Jun 7, 2022
3 tasks done
@MVrachev
MVrachev requested a review from lukpueh June 7, 2022 15:22
@MVrachev

MVrachev commented Jun 7, 2022

Copy link
Copy Markdown
Collaborator Author

I updated the pr following @lukpueh suggestions.

@lukpueh lukpueh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM modulo one typo.

Comment thread tests/test_metadata_eq_.py Resolved
There is a lot of repetitive code inside test_metadata_eq_.py.
Remove it by using the decorator.

I am initializing the object instances in setUpClass instead of doing it
inside the test function in order to escape the need for
reinitialization of the instances on each attribute.

Signed-off-by: Martin Vrachev <[email protected]>
@MVrachev

MVrachev commented Jun 8, 2022

Copy link
Copy Markdown
Collaborator Author

Fixed the typo.

@lukpueh
lukpueh merged commit b8360a2 into theupdateframework:develop Jun 8, 2022
@MVrachev
MVrachev deleted the fix-eq-tests branch June 8, 2022 20:07
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.

3 participants