mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-03-15 06:40:24 +01:00
test: tests for epsilon tensors extended
This commit is contained in:
parent
c8cb0e4cb8
commit
3a57471ccf
1 changed files with 17 additions and 0 deletions
|
@ -44,3 +44,20 @@ def test_epsilon_tensor():
|
|||
(1, 1, 3) : 0.0}
|
||||
for key, value in check.items():
|
||||
assert pe.dirac.epsilon_tensor(*key) == value
|
||||
with pytest.raises(Exception):
|
||||
pe.dirac.epsilon_tensor(0, 1, 3)
|
||||
|
||||
|
||||
def test_epsilon_tensor_rank4():
|
||||
check = {(1, 4, 3, 2) : -1.0,
|
||||
(1, 2, 3, 4) : 1.0,
|
||||
(2, 1, 3, 4) : -1.0,
|
||||
(4, 3, 2, 1) : 1.0,
|
||||
(3, 2, 4, 3) : 0.0,
|
||||
(0, 1, 2, 3) : 1.0,
|
||||
(1, 1, 1, 1) : 0.0,
|
||||
(1, 2, 3, 1) : 0.0}
|
||||
for key, value in check.items():
|
||||
assert pe.dirac.epsilon_tensor_rank4(*key) == value
|
||||
with pytest.raises(Exception):
|
||||
pe.dirac.epsilon_tensor_rank4(0, 1, 3, 4)
|
||||
|
|
Loading…
Add table
Reference in a new issue