amuse icon indicating copy to clipboard operation
amuse copied to clipboard

Move code tests to code dirs (attempt 2)

Open rieder opened this issue 2 years ago • 6 comments

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 avatar Dec 14 '23 10:12 rieder

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?

rieder avatar Dec 14 '23 10:12 rieder

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.

LourensVeen avatar Dec 15 '23 11:12 LourensVeen

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[bot] avatar Feb 13 '24 12:02 stale[bot]

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...

LourensVeen avatar Feb 13 '24 14:02 LourensVeen

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[bot] avatar Apr 13 '24 15:04 stale[bot]