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 test input/output to separate directories #609

Open
7 tasks
jesper-friis opened this issue Aug 20, 2023 · 1 comment
Open
7 tasks

Move test input/output to separate directories #609

jesper-friis opened this issue Aug 20, 2023 · 1 comment

Comments

@jesper-friis
Copy link
Collaborator

jesper-friis commented Aug 20, 2023

Currently running the tests pollutes the current directory with a lot of test output files. To avoid this, write test output to a output sub-directory of the test directory.

It would also be easier to spot test input if they are moved to a input sub-directory of the test directory.

Test directories that should be fixed:

  • bindings/python/tests/
  • bindings/fortran/tests/
  • src/tests/
  • src/utils/tests/
  • storages/json/tests/
  • storages/rdf/tests/
  • tools/tests/
@jesper-friis
Copy link
Collaborator Author

PR #720 addresses this for two tests in binding/python/tests/

jesper-friis added a commit that referenced this issue Dec 6, 2023
# Description
Applied general improvements from PR 667.

The purpose of this PR is to ensure that the fixes in PR 667 are not
lost. This includes
- save test output in a separate directory (for some tests, see issue
#609)
- do not run test_property_mappings if rdflib is missing
- documented environment variable DLITE_ATEXIT_FREE
- fixed memory leak in test_bson_storage

Explanation of some of the changes can be found on #720

## Type of change
- [x] Bug fix & code cleanup
- [ ] New feature
- [ ] Documentation update
- [ ] Test update

## Checklist for the reviewer
This checklist should be used as a help for the reviewer.

- [ ] Is the change limited to one issue?
- [ ] Does this PR close the issue?
- [ ] Is the code easy to read and understand?
- [ ] Do all new feature have an accompanying new test?
- [ ] Has the documentation been updated as necessary?
jesper-friis added a commit that referenced this issue Jan 24, 2024
# Description
Moved entities, input and output files to respectively sub-directories
in the Python tests.

Closes #689 
Addresses also issue #609 

While updating the tests to use the new sub-directories, a few other
path-related issues were discovered and fixed:
* two potential segfaults in dlite-storage.i and dlite.rdf.c if an
invalid path is provided were fixed
* raise DLiteParseError instead of DLiteOtherError for invalid json
input
* allow to hide DLiteOtherError by using DLiteUnknownError.


## Type of change
- [x] Bug fix & code cleanup
- [ ] New feature
- [ ] Documentation update
- [ ] Test update

## Checklist for the reviewer
This checklist should be used as a help for the reviewer.

- [ ] Is the change limited to one issue?
- [ ] Does this PR close the issue?
- [ ] Is the code easy to read and understand?
- [ ] Do all new feature have an accompanying new test?
- [ ] Has the documentation been updated as necessary?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant