Description
The symbolic_kernel.py module provides various functions for computing psychological metrics and other symbolic operations, but there are no accompanying unit tests to ensure their correctness. Adding a test suite will help detect regressions and clarify expected behaviour.
Proposed work
- Create a
tests/ directory in the Remember repository with a test_symbolic_kernel.py file.
- For each public function in
symbolic_kernel.py, write test cases that cover common inputs and edge cases. For instance, verify that valence() handles positive and negative numbers and that dominance() behaves consistently with zero or negative denominators.
- Use
pytest and parametrized tests to reduce boilerplate where functions can be tested with multiple inputs and expected outputs.
- Update the README with instructions for running the test suite (
pip install -r requirements.txt && pytest).
Acceptance criteria
- Executing
pytest runs the new tests without failures.
- Each function in
symbolic_kernel.py has at least one corresponding test case covering nominal and edge cases.
- Clear instructions for running the tests are provided in the project documentation.