File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212
1313"""Tests for pubchem.py."""
1414
15+ import os
16+
1517import numpy
16- import pytest
1718import pubchempy
19+ import pytest
1820
1921from openfermion .chem .pubchem import geometry_from_pubchem
2022from openfermion .testing .testing_utils import module_importable
@@ -149,6 +151,11 @@ def test_water_2d(self, monkeypatch):
149151 with pytest .raises (ValueError , match = 'Incorrect value for the argument structure' ):
150152 _ = geometry_from_pubchem ('water' , structure = 'foo' )
151153
154+ # Skip if running in a CI environment.
155+ @pytest .mark .skipif (
156+ 'CI' in os .environ ,
157+ reason = 'Skipping Pubchem API tests in CI to avoid failures due to busy servers.' ,
158+ )
152159 @pytest .mark .flaky (retries = 8 , delay = 30 , only_on = [pubchempy .ServerBusyError ])
153160 def test_geometry_from_pubchem_live_api (self ):
154161 water_geometry = geometry_from_pubchem ('water' )
You can’t perform that action at this time.
0 commit comments