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 unit tests that mistakenly used assertTrue(a,b) instead of assertEqual(a,b) #103

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jwalden
Copy link

@jwalden jwalden commented Jan 12, 2022

In unit tests, replaced occurrences of assertTrue(a,b) which does not compare the values a and b with assertEqual(a,b) which does compare the two values.

compare the values a and b with assertEqual(a,b) which does compare
the two values.

Signed-off-by: James Walden <[email protected]>
@valeriocos
Copy link
Member

Hi @jwalden, thank you for your contribution. Since the two commits are addressing different things (a fix in the tests and a new analyzer), I'd suggest to submit 2 PRs. This would simplify the reviewing process, thanks!

@jwalden
Copy link
Author

jwalden commented Jan 13, 2022 via email

@valeriocos
Copy link
Member

Your branch is now visible through this PR, thus any change you commit there will be automatically reflected here. The tab commits in this page lists the commits you have pushed to your branch and are not present in master (some additional info is available here). Hope this helps.

To fix the DCO failure, please remember to sign-off your commits, details here: https://github.com/chaoss/grimoirelab/blob/master/CONTRIBUTING.md#dco-and-sign-off-for-contributions, thanks

@jwalden
Copy link
Author

jwalden commented Jan 14, 2022 via email

@vchrombie
Copy link
Member

I think I've fixed this. I moved the second commit to the cqmetrics branch. Let me know if you still see both commits or just one.

Yes, I think this is fixed. I don't see any unrelated change in the PR.

But, I think the commit message needs to be improved. You can find the guidelines to write a proper commit message from https://github.com/chaoss/grimoirelab/blob/master/CONTRIBUTING.md#guidelines-to-follow-to-write-good-commit-messages

Please let me know if you need any help related to it.

Thanks for your contribution!!

Many unit tests used assertTrue(a,b) to test for equality of a and b.
To test equality of a and b in PyUnit, assertEqual(a,b) should be used,
so this commit replaces occurrences of assertTrue() with assertEqual()
when comparison is intended.

Signed-off-by: James Walden <[email protected]>
@jwalden
Copy link
Author

jwalden commented Feb 4, 2022

I updated the commit message a couple of weeks ago. Are there any other changes needed to accept this PR?

@vchrombie
Copy link
Member

I updated the commit message a couple of weeks ago. Are there any other changes needed to accept this PR?

Sorry for the inconvenience caused @jwalden. I missed the PR.

The builds were failing because of the old python dependency. I have opened #109 for this purpose.
I will follow up on this and make sure to merge this PR once it is ready.

@vchrombie
Copy link
Member

Hi @jwalden, sorry for making you wait for so long. We have fixed the CI and other issues. Can you please rebase your branch to include the latest changes and test the workflows too.

Thank you. Please let me know if you need any help.

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