Unit tests and integration tests for the BondForge.
We're working on comprehensive test coverage. Contributions welcome!
-
test_interaction_analyzer.py- Core analyzer functions -
test_extended_analyzer.py- Extended analyzer functions -
test_visualizer.py- Visualization functions -
test_distance_calculations.py- Geometric calculations -
test_angle_calculations.py- Angular measurements -
test_energy_estimates.py- Energy calculations
-
test_full_analysis.py- End-to-end analysis pipeline -
test_export.py- Export functionality -
test_large_structures.py- Performance on large proteins -
test_multi_chain.py- Multi-chain structure handling
- Sample PDB files for testing
- Known interaction examples
- Edge case structures
- Invalid input handling
Once tests are implemented, run with:
# Run all tests
pytest tests/
# Run with coverage
pytest tests/ --cov=src --cov-report=html
# Run specific test file
pytest tests/test_interaction_analyzer.py
# Run with verbose output
pytest tests/ -vWe especially need help with:
- Test Data: Finding good test structures with known interactions
- Edge Cases: Unusual structures, missing atoms, etc.
- Performance Tests: Benchmarking on large structures
- Validation Tests: Comparing with other tools
See CONTRIBUTING.md for guidelines.
import pytest
from src.interaction_analyzer import ProteinInteractionAnalyzer
class TestHydrogenBonds:
@pytest.fixture
def analyzer(self):
return ProteinInteractionAnalyzer('tests/data/test_structure.pdb')
def test_find_hydrogen_bonds(self, analyzer):
h_bonds = analyzer.find_hydrogen_bonds()
assert len(h_bonds) > 0
assert 'donor' in h_bonds[0]
assert 'acceptor' in h_bonds[0]
def test_hydrogen_bond_distance(self, analyzer):
h_bonds = analyzer.find_hydrogen_bonds(distance_cutoff=3.0)
for bond in h_bonds:
assert bond['distance'] <= 3.0Tests will run automatically on:
- Pull requests
- Pushes to main/develop branches
- Release tags
See .github/workflows/ci.yml for configuration.
Help Wanted! 🙏
If you'd like to contribute to test development, please:
- Open an issue to discuss
- Submit a PR with new tests
- Help validate existing functionality
Thank you for helping make this software more reliable!