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

Refactor Particle tests to not use exec and eval #1460

Open
namurphy opened this issue Mar 1, 2022 · 0 comments
Open

Refactor Particle tests to not use exec and eval #1460

namurphy opened this issue Mar 1, 2022 · 0 comments
Assignees
Labels
plasmapy.particles Related to the plasmapy.particles subpackage refactoring ♻️ Improving an implementation without adding new functionality testing

Comments

@namurphy
Copy link
Member

namurphy commented Mar 1, 2022

It's generally a best practice to avoid exec and eval statements in Python code because of security risks, and also because it makes code more complicated. Some of the tests of Particle in test_particle_class.py use exec, and should be refactored to avoid using exec.

@namurphy namurphy mentioned this issue Mar 2, 2022
5 tasks
@namurphy namurphy changed the title Refactor Particle tests to not use exec statement Refactor Particle tests to not use exec and eval Mar 4, 2022
@namurphy namurphy self-assigned this Mar 4, 2022
@namurphy namurphy added plasmapy.particles Related to the plasmapy.particles subpackage testing refactoring ♻️ Improving an implementation without adding new functionality labels Mar 4, 2022
@github-actions github-actions bot added the Stale Dormant issues & PRs which will be automatically closed if the label is not removed. label May 4, 2022
@namurphy namurphy removed the Stale Dormant issues & PRs which will be automatically closed if the label is not removed. label May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plasmapy.particles Related to the plasmapy.particles subpackage refactoring ♻️ Improving an implementation without adding new functionality testing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant