diff --git a/tests/creation_test.py b/tests/creation_test.py new file mode 100644 index 0000000..b8ad8e5 --- /dev/null +++ b/tests/creation_test.py @@ -0,0 +1,12 @@ +import pytest +import torch +from parity_tensor import ParityTensor + +def test_creation() -> None: + x = ParityTensor((False, False), ((2, 2), (1, 3)), torch.randn([4, 4])) + with pytest.raises(AssertionError): + x = ParityTensor((False, False, False), ((2, 2), (1, 3)), torch.randn([4, 4])) + with pytest.raises(AssertionError): + x = ParityTensor((False, False), ((2, 2), (1, 3), (3, 1)), torch.randn([4, 4])) + with pytest.raises(AssertionError): + x = ParityTensor((False, False), ((2, 2), (1, 1)), torch.randn([4, 4])) \ No newline at end of file