This directory contains tests for the gfftk package.
To run the tests, use pytest:
cd /Users/jon/software/gfftk
python -m pytestTo run tests with verbose output:
python -m pytest -vTo run a specific test file:
python -m pytest tests/unit/test_gff.pyTo run a specific test:
python -m pytest tests/unit/test_gff.py::TestGFFParsing::test_detect_format-
unit/: Unit tests for individual functions and classestest_basic.py: Basic tests to verify pytest is workingtest_gff.py: Tests for the gff moduletest_consensus.py: Tests for the consensus moduletest_convert.py: Tests for the convert module
-
data/: Test data filessample.gff3: Sample GFF3 file for testingsample.fasta: Sample FASTA file for testing
When adding new tests, follow these guidelines:
- Create a new test file in the appropriate directory (e.g.,
tests/unit/test_new_module.py) - Use the pytest framework for writing tests
- Use descriptive test names that indicate what is being tested
- Use fixtures for common test data
- Clean up any temporary files created during tests
To run tests with coverage reporting:
python -m pytest --cov=gfftkTo generate a detailed HTML coverage report:
python -m pytest --cov=gfftk --cov-report=htmlThis will create a htmlcov directory with the coverage report.