feat: epsilon tensors moved to dirac submodule, tests added

This commit is contained in:
Fabian Joswig 2021-12-23 12:00:10 +01:00
parent b50346dcf3
commit c8cb0e4cb8
3 changed files with 36 additions and 12 deletions

View file

@ -32,3 +32,15 @@ def test_grid_dirac():
pe.dirac.Grid_gamma(gamma)
with pytest.raises(Exception):
pe.dirac.Grid_gamma('Not a gamma matrix')
def test_epsilon_tensor():
check = {(1, 2, 3) : 1.0,
(3, 1, 2) : 1.0,
(2, 3, 1) : 1.0,
(1, 1, 1) : 0.0,
(3, 2, 1) : -1.0,
(1, 3, 2) : -1.0,
(1, 1, 3) : 0.0}
for key, value in check.items():
assert pe.dirac.epsilon_tensor(*key) == value