Skip to content

Commit 33124d3

Browse files
mhuckapavoljuhas
andauthored
Update src/openfermion/chem/pubchem_test.py
Co-authored-by: Pavol Juhas <pavol.juhas@gmail.com>
1 parent ec8eada commit 33124d3

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/openfermion/chem/pubchem_test.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,5 @@ def test_geometry_from_pubchem_live_api(self):
156156
try:
157157
water_geometry = geometry_from_pubchem('water') # pragma: no cover
158158
self.assertEqual(len(water_geometry), 3) # pragma: no cover
159-
except Exception as e: # pragma: no cover
160-
if 'ServerBusyError' in type(e).__name__:
161-
pytest.skip('PubChem API is busy.')
162-
raise
159+
except pubchempy.ServerBusyError: # pragma: no cover
160+
pytest.skip('PubChem server is busy.')

0 commit comments

Comments
 (0)