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

Move code tests to code dirs (attempt 2) #1022

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

rieder
Copy link
Member

@rieder rieder commented Dec 14, 2023

The idea is that the tests for a specific community code (which is available as a separate package) should be included with that code, and not in a centralised place.

@rieder
Copy link
Member Author

rieder commented Dec 14, 2023

If this PR is merged, the tests for a code will be available under src/amuse/community/{codename}/test_{code}.py.
Maybe it should be even simpler, src/amuse/community/{codename}/test.py?

@LourensVeen
Copy link
Collaborator

Assuming the tests will all be in Python, then making a src/amuse/community/{codename}/tests/ directory with one or more test_<something.py files would be the standard way to do it. Pytest will auto-discover this, and we could set it up so that you can run pytest from the root to run all tests, or from a community code subdirectory to only run its tests.

Copy link

stale bot commented Feb 13, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 28 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Issues that have been around for a while without updates label Feb 13, 2024
@LourensVeen
Copy link
Collaborator

Hmm, I think this is a good idea, and it's tempting to do it while working on the new build system. I will want to test things anyway to reduce the chances of breaking anything, and since I'm setting up a new system to build and install, I might as well add running tests to it. If it's just moving the files...

@stale stale bot removed the stale Issues that have been around for a while without updates label Feb 13, 2024
Copy link

stale bot commented Apr 13, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 28 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Issues that have been around for a while without updates label Apr 13, 2024
@stale stale bot removed the stale Issues that have been around for a while without updates label Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants