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

Recover commented out code in tests and mark with pytest.mark.skip instead #4027

Merged

Conversation

DanielYang59
Copy link
Contributor

@DanielYang59 DanielYang59 commented Sep 2, 2024

Summary

  • Recover commented out code in tests and mark with pytest.mark.skip instead (with TODO: need someone to fix this message for easy search), though currently ERA is ignored:
    "ERA", # Check for commented-out code

Rationale

Commented out code ages badly if not covered by any linter, perhaps we should mark them with pytest.mark.skip instead until someone come and fix them (hopefully).

@janosh janosh added tests Issues with or changes to the pymatgen test suite linting Linting and quality assurance labels Sep 2, 2024
@DanielYang59 DanielYang59 marked this pull request as ready for review September 2, 2024 07:41
@DanielYang59
Copy link
Contributor Author

DanielYang59 commented Sep 2, 2024

Looks like there isn't more commented out code in tests (searched with #\s+def and #\s+class , using \s+ in case multiple spaces are inserted).

Also we only have 104 lines of code commented in tests (might include a few false positive), should be possible to enable ERA for tests at some point.

@DanielYang59 DanielYang59 changed the title Recover commented out in tests and mark with pytest.mark.skip instead Recover commented out code in tests and mark with pytest.mark.skip instead Sep 2, 2024
@janosh janosh merged commit 40fce4f into materialsproject:master Sep 2, 2024
43 checks passed
@DanielYang59 DanielYang59 deleted the commented-out-code-in-test branch September 2, 2024 09:10
@DanielYang59
Copy link
Contributor Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linting Linting and quality assurance tests Issues with or changes to the pymatgen test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants