Skip to content

Commit 5810e4f

Browse files
committed
chore: merge branch
2 parents 6aefe3d + cf66a25 commit 5810e4f

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/openfermion/chem/pubchem_test.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@
1212

1313
"""Tests for pubchem.py."""
1414

15+
import os
16+
1517
import numpy
16-
import pytest
1718
import pubchempy
19+
import pytest
1820

1921
from openfermion.chem.pubchem import geometry_from_pubchem
2022
from 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')

0 commit comments

Comments
 (0)