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_testing/test_labels.py::test_remove_missing_labels #3191

Merged
merged 5 commits into from Feb 19, 2021

Conversation

Drulex
Copy link
Collaborator

@Drulex Drulex commented Jan 22, 2021

Checklist

GitHub

  • I've given this PR a concise, self-descriptive, and meaningful title
  • I've linked relevant issues in the PR body
  • I've applied the relevant labels to this PR
  • I've assigned a reviewer

PR contents

Description

Closes #3153

@Drulex Drulex added bug category: fixes an error in the code tests context: unit, integration, or functional tests labels Jan 22, 2021
@Drulex Drulex requested a review from kousu January 22, 2021 17:08
@Drulex Drulex self-assigned this Jan 22, 2021
@Drulex Drulex force-pushed the aj/3153-fix_test_missing_labels branch from 571a24d to 7e6b511 Compare January 22, 2021 17:09
@kousu
Copy link
Contributor

kousu commented Jan 22, 2021

Amazing, thank you for taking this on. I'll take a look momentarily.

@Drulex
Copy link
Collaborator Author

Drulex commented Jan 22, 2021

Woops looks like I broke something. Will look.

….value directly instead of

relying on membership check with "in" operator.
@Drulex Drulex force-pushed the aj/3153-fix_test_missing_labels branch from 7e6b511 to 5160e3d Compare January 25, 2021 20:11
@Drulex
Copy link
Collaborator Author

Drulex commented Jan 25, 2021

CI failed because wsl couldn't be installed on windows (https://travis-ci.com/github/neuropoly/spinalcordtoolbox/jobs/475181141#L45)...

- don't compare all voxels, only labels
- spotcheck the relevant labels
- use actual labels as test param instead of image
@Drulex Drulex force-pushed the aj/3153-fix_test_missing_labels branch from 5160e3d to 4b62fab Compare January 26, 2021 14:09
@Drulex
Copy link
Collaborator Author

Drulex commented Feb 8, 2021

ping @kousu

@joshuacwnewton
Copy link
Member

joshuacwnewton commented Feb 8, 2021

@Drulex I can review as well, if that's alright? 🙂

Copy link
Member

@joshuacwnewton joshuacwnewton left a comment

Choose a reason for hiding this comment

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

This PR is fixing 2 issues, right?

  1. Broken test (because of wrong input data)
  2. Slow, inefficient test

If so, it might be good to clarify the issue description, as #3153 only reports 1).

spinalcordtoolbox/labels.py Show resolved Hide resolved
unit_testing/test_labels.py Show resolved Hide resolved
unit_testing/test_labels.py Show resolved Hide resolved
Copy link
Member

@joshuacwnewton joshuacwnewton left a comment

Choose a reason for hiding this comment

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

Thanks for clarifying! LGTM.

@Drulex Drulex merged commit e408b65 into master Feb 19, 2021
@joshuacwnewton joshuacwnewton added this to the next-release milestone Feb 22, 2021
@joshuacwnewton joshuacwnewton deleted the aj/3153-fix_test_missing_labels branch April 4, 2021 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug category: fixes an error in the code tests context: unit, integration, or functional tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix unit_testing/test_labels.py::test_remove_missing_labels
3 participants