Skip to content

Commit

Permalink
Add symmetry group test
Browse files Browse the repository at this point in the history
  • Loading branch information
edan-bainglass committed Jan 6, 2025
1 parent e99619b commit 1927b0b
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions tests/test_result.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import pytest
from bs4 import BeautifulSoup

from aiidalab_qe.app.main import App
Expand Down Expand Up @@ -78,6 +79,35 @@ def test_summary_report_advanced_settings(data_regression, generate_qeapp_workch
assert moments["Si"] == 0.1


@pytest.mark.parametrize(
("pbc", "symmetry_key"),
[
[(False, False, False), "point_group"], # 0D
[(True, False, False), "space_group"], # 1D
[(True, True, False), "space_group"], # 2D
[(True, True, True), "space_group"], # 3D
],
)
def test_summary_report_symmetry_group(
generate_qeapp_workchain,
generate_structure_data,
pbc,
symmetry_key,
):
"""Test summary report includes correct symmetry group for all system dimension."""

system = generate_structure_data("silicon", pbc=pbc)
workchain = generate_qeapp_workchain(
structure=system,
run_bands=False,
relax_type="none",
)
model = WorkChainSummaryModel()
model.process_uuid = workchain.node.uuid
report_parameters = model._generate_report_parameters()
assert symmetry_key in report_parameters["initial_structure_properties"]


def test_summary_view(generate_qeapp_workchain):
"""Test the report html can be properly generated."""
workchain = generate_qeapp_workchain()
Expand Down

0 comments on commit 1927b0b

Please sign in to comment.