Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mbercx committed May 10, 2023
1 parent 018e5a5 commit a88dfc7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/aiida_quantumespresso/workflows/pdos.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def validate_energy_range_vs_fermi(value, _):
"""
if len(value) != 2:
return f'`energy_range_vs_fermi` should be a `List` of length two, but got: {value}'
if not all(isinstance(val, float) for val in value):
if not all(isinstance(val, (float, int)) for val in value):
return f'`energy_range_vs_fermi` should be a `List` of floats, but got: {value}'


Expand Down
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ def generate_workchain_pdos(generate_workchain, generate_inputs_pw, fixture_code
"""Generate an instance of a `PdosWorkChain`."""

def _generate_workchain_pdos():
from aiida.orm import Bool, Dict
from aiida.orm import Bool, Dict, List

from aiida_quantumespresso.utils.resources import get_default_options

Expand Down Expand Up @@ -855,7 +855,7 @@ def _generate_workchain_pdos():
'nscf': nscf,
'dos': dos,
'projwfc': projwfc,
'align_to_fermi': Bool(True),
'energy_range_vs_fermi': List([-10, 10]),
'dry_run': Bool(True)
}

Expand Down

0 comments on commit a88dfc7

Please sign in to comment.