Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: skip test of electronic_configuration_embedding if mendeleev is not installed #3755

Merged
merged 1 commit into from
May 7, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ repos:
exclude: ^source/3rdparty
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.4.2
rev: v0.4.3
hooks:
- id: ruff
args: ["--fix"]
Expand Down
8 changes: 8 additions & 0 deletions source/tests/common/test_econf_embd.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@
make_econf_embedding,
)

try:
import mendeleev # noqa: F401

Check notice

Code scanning / CodeQL

Unused import Note test

Import of 'mendeleev' is not used.

has_mendeleev = True
except ImportError:
has_mendeleev = False


@unittest.skipIf(not has_mendeleev, "does not have mendeleev installed, skip the UTs.")
class TestEConfEmbd(unittest.TestCase):
def test_fe(self):
res = make_econf_embedding(["Fe"], flatten=False)["Fe"]
Expand Down