Skip to content

Commit 113600c

Browse files
Test, undo later.
1 parent 89d1273 commit 113600c

1 file changed

Lines changed: 23 additions & 24 deletions

File tree

tests/aiida_ensemble/test_aiida_ensemble.py

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def test_clean_runs():
2727
ensemble.force_computed = np.array([True, False, True, True], dtype=bool)
2828
ensemble.stress_computed = np.copy(ensemble.force_computed)
2929
ensemble._clean_runs()
30-
30+
3131
assert all(ensemble.force_computed)
3232
assert len(ensemble.force_computed) == 3
3333
assert len(ensemble.stress_computed) == 3
@@ -44,43 +44,42 @@ def test_get_running_workchains(generate_workchain_pw_node):
4444
running = ProcessState.RUNNING
4545

4646
workchains = [
47-
generate_workchain_pw_node(process_state=finished, exit_status=0, label='T_300_id_0'),
47+
generate_workchain_pw_node(process_state=finished, exit_status=0, label='T_300_id_0'),
4848
generate_workchain_pw_node(process_state=finished, exit_status=300, label='T_300_id_1'),
4949
]
5050
success = [False, False]
51-
51+
5252
wcs_left = get_running_workchains(workchains=workchains, success=success)
53-
53+
5454
assert not wcs_left
5555
assert success == [True, False]
5656

5757
workchains = [
58-
generate_workchain_pw_node(process_state=running, label='T_300_id_0'),
58+
generate_workchain_pw_node(process_state=running, label='T_300_id_0'),
5959
generate_workchain_pw_node(process_state=finished, label='T_300_id_1'),
6060
generate_workchain_pw_node(process_state=running, label='T_300_id_2'),
6161
]
6262
success = [False, False, False]
63-
63+
6464
wcs_left = get_running_workchains(workchains=workchains, success=success)
65-
65+
6666
assert wcs_left == [workchains[0], workchains[2]]
6767
assert success == [False, True, False]
6868

6969

70-
@pytest.mark.usefixtures('aiida_profile')
71-
def test_submit_and_get_workchains(fixture_code):
72-
"""Test the :func:`sscha.aiida_ensemble.submit_and_get_workchains` method."""
73-
from cellconstructor.Structure import Structure
74-
from sscha.aiida_ensemble import submit_and_get_workchains
75-
76-
pw_code = fixture_code('quantumespresso.pw')
77-
structures = [Structure(nat=1) for _ in range(5)]
78-
79-
workchains = submit_and_get_workchains(
80-
structures=structures,
81-
pw_code=pw_code,
82-
temperature=300,
83-
)
84-
85-
assert len(workchains) == 5
86-
70+
# @pytest.mark.usefixtures('aiida_profile')
71+
# def test_submit_and_get_workchains(fixture_code):
72+
# """Test the :func:`sscha.aiida_ensemble.submit_and_get_workchains` method."""
73+
# from cellconstructor.Structure import Structure
74+
# from sscha.aiida_ensemble import submit_and_get_workchains
75+
#
76+
# pw_code = fixture_code('quantumespresso.pw')
77+
# structures = [Structure(nat=1) for _ in range(5)]
78+
#
79+
# workchains = submit_and_get_workchains(
80+
# structures=structures,
81+
# pw_code=pw_code,
82+
# temperature=300,
83+
# )
84+
#
85+
# assert len(workchains) == 5

0 commit comments

Comments
 (0)