Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinfriede committed Sep 17, 2024
1 parent ec2e50b commit 244378c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/dxtb/_src/cli/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,10 @@ def singlepoint(self) -> Result | Tensor:
if args.grad is True:
positions.requires_grad = True

if args.method.lower() == "gfn1" or args.method.lower() == "gfn1-xtb":
if config.method == labels.GFN1_XTB:
# pylint: disable=import-outside-toplevel
from dxtb import GFN1_XTB as par
elif args.method.lower() == "gfn2" or args.method.lower() == "gfn2-xtb":
elif config.method == labels.GFN2_XTB:
raise NotImplementedError("GFN2-xTB is not implemented yet.")
else:
raise ValueError(f"Unknown method '{args.method}'.")
Expand Down
4 changes: 2 additions & 2 deletions test/test_cli/test_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def test_defaults() -> None:
assert isinstance(args.maxiter, int)
assert args.maxiter == defaults.MAXITER

assert isinstance(args.guess, str)
assert isinstance(args.guess, int)
assert args.guess == defaults.GUESS

assert isinstance(args.fermi_etemp, float)
Expand All @@ -57,7 +57,7 @@ def test_defaults() -> None:
assert isinstance(args.fermi_maxiter, int)
assert args.fermi_maxiter == defaults.FERMI_MAXITER

assert isinstance(args.fermi_partition, str)
assert isinstance(args.fermi_partition, int)
assert args.fermi_partition == defaults.FERMI_PARTITION

# integral settings
Expand Down

0 comments on commit 244378c

Please sign in to comment.