This PR adds unit tests for the PubChem service in the pura library. The tests are located in a new file tests/test_services/test_pubchem.py.
The tests focus on the resolve_compound method of the PubChem class, using mocked HTTP requests to simulate interactions with the PubChem API. The tests use the pytest and unittest.mock libraries.
The test data includes name and SMILES pairs provided in the issue description. This ensures that the resolve_compound method can correctly resolve these identifiers using the PubChem service.
By adding these tests, we can increase the reliability and maintainability of the pura library, ensuring that future changes do not unintentionally break the PubChem service functionality.
This PR adds unit tests for the
PubChem
service in thepura
library. The tests are located in a new filetests/test_services/test_pubchem.py
.The tests focus on the
resolve_compound
method of thePubChem
class, using mocked HTTP requests to simulate interactions with the PubChem API. The tests use thepytest
andunittest.mock
libraries.The test data includes name and SMILES pairs provided in the issue description. This ensures that the
resolve_compound
method can correctly resolve these identifiers using the PubChem service.By adding these tests, we can increase the reliability and maintainability of the
pura
library, ensuring that future changes do not unintentionally break thePubChem
service functionality.Fixes #47.