Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/openfermion/chem/pubchem_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@

"""Tests for pubchem.py."""

import os

import numpy
import pytest
import pubchempy
import pytest

from openfermion.chem.pubchem import geometry_from_pubchem
from openfermion.testing.testing_utils import module_importable
Expand Down Expand Up @@ -149,6 +151,11 @@ def test_water_2d(self, monkeypatch):
with pytest.raises(ValueError, match='Incorrect value for the argument structure'):
_ = geometry_from_pubchem('water', structure='foo')

# Skip if running in a CI environment.
@pytest.mark.skipif(
'CI' in os.environ,
reason='Skipping Pubchem API tests in CI to avoid failures due to busy servers.',
)
@pytest.mark.flaky(retries=8, delay=30, only_on=[pubchempy.ServerBusyError])
def test_geometry_from_pubchem_live_api(self):
water_geometry = geometry_from_pubchem('water')
Expand Down