Testing Instructions
This document provides detailed instructions for testing pyremap
.
Running Tests
Ensure all dependencies are installed. You can use
conda
to install any missing dependencies:conda install --file dev-spec.txt
Install pyremap in edit mode:
python -m pip install --no-deps --no-build-isolation -e .
Run the test suite using
pytest
:pytest --pyargs tests
To run a specific test file, provide the file path:
pytest path/to/test_file.py
For more verbose output, use the
-v
flag:pytest -v --pyargs tests
Writing Tests
Place all test files in the
pyremap/tests/
directory.Use descriptive names for test functions and files.
Follow the
pytest
conventions for writing tests.
Debugging Failures
Use the
--pdb
flag to drop into the Python debugger on test failure:pytest --pdb --pyargs tests
Review the stack trace provided by
pytest
to identify the source of the failure.
Additional Resources
Refer to the pytest documentation for advanced usage and features.