Skip to content

Commit

Permalink
Fix "Variable defined multiple times"
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinfriede committed Dec 14, 2023
1 parent 349ab87 commit d48be67
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions tests/test_dftd3.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@


def test_fail() -> None:
numbers = torch.tensor([1, 1])
positions = torch.tensor([[0.0, 0.0, 0.0], [0.0, 0.0, 1.0]])

# TPSS0-D3BJ-ATM parameters
Expand All @@ -41,13 +40,11 @@ def test_fail() -> None:

# unsupported element
with pytest.raises(ValueError):
numbers = torch.tensor([1, 105])
dftd3(numbers, positions, param)
dftd3(torch.tensor([1, 105]), positions, param)

# wrong numbers
with pytest.raises(ValueError):
numbers = torch.tensor([1])
dftd3(numbers, positions, param)
dftd3(torch.tensor([1]), positions, param)


@pytest.mark.parametrize("dtype", [torch.float32, torch.float64])
Expand Down

0 comments on commit d48be67

Please sign in to comment.