Skip to content

Commit

Permalink
correct the test behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
unkcpz committed Dec 14, 2023
1 parent b309d5b commit 6ced438
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions aiidalab_widgets_base/computational_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ def _get_codes(self):
codes = []
for c in orm.QueryBuilder().append(orm.Code, filters=filters).all():
code = c[0]
print(code)

if not code.is_hidden or self.allow_hidden_codes:
codes.append((self._full_code_label(code), code.uuid))
Expand Down
6 changes: 3 additions & 3 deletions tests/test_computational_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ def test_resource_setup_widget_default():
# and the computer/code setup widget will be updated accordingly.
w.comp_resources_database.domain_selector.value = "daint.cscs.ch"
w.comp_resources_database.computer_selector.value = "mc"
w.comp_resources_database.code_selector.value = "QuantumESPRESSO-7.2"
w.comp_resources_database.code_selector.value = "QuantumESPRESSO"

# Test before the template is filled, the warning message is displayed.
w._on_quick_setup()
Expand Down Expand Up @@ -560,7 +560,7 @@ def test_resource_setup_widget_default():
w._on_quick_setup()

assert w.success
assert orm.load_code("pw-7.2@daint-mc")
assert orm.load_code("pw-7.1@daint-mc")

# test select new resource reset the widget, success trait, and message trait.
w.reset()
Expand Down Expand Up @@ -660,7 +660,7 @@ def test_resource_setup_widget_computer_change_code_reset():
# and the computer/code setup widget will be updated accordingly.
w.comp_resources_database.domain_selector.value = "daint.cscs.ch"
w.comp_resources_database.computer_selector.value = "mc"
w.comp_resources_database.code_selector.value = "QuantumESPRESSO-7.2"
w.comp_resources_database.code_selector.value = "QuantumESPRESSO"

assert w.template_code._help_text.layout.display == "block"

Expand Down

0 comments on commit 6ced438

Please sign in to comment.