Skip to content

Commit 6600dd8

Browse files
authored
Merge branch 'main' into remove-python2-left-overs
2 parents c6eb2b8 + 40caf92 commit 6600dd8

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
[tool.black]
1616
line-length = 100
17-
target_version = ['py310', 'py311', 'py312', 'py313']
17+
target-version = ['py310', 'py311', 'py312', 'py313']
1818
skip-string-normalization = true
1919
skip-magic-trailing-comma = true
2020

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)