-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
In thermodynamics.rs, the reason tests were failing is because of GET requests being made to pubchem, which were occasionally being denied.
I think we should not have this functionality in the test suite. The reliance on pubchem being receptive to requests is causing tests to be unreliable, as they will only pass if pubchem does not deny our web requests everytime we test.
The end user should still be able to make these requests, but for testing, we should use a local dataset, instead of pulling them from pubchem. This is an example:
assert_eq!(
thermo_state.mass_list[0]
.chemical_species
.get_pubchem_obj()
.cids()
.unwrap()[0],
962
);
.cids() looks like this:
/// Retrieve the Compound IDs designating the compound.
pub fn cids(&self) -> Result<Vec<i32>, Error> {
self.request("cids")
.and_then(|response| rest::IdentifierList::from_api_response(response))
.map(|list| list.cids)
}
This reliance on a GET request is what is causing stochastic test behavior.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request