Explorar o código

Added more tests

Adam Kelly %!s(int64=6) %!d(string=hai) anos
pai
achega
7ad739b6da
Modificáronse 1 ficheiros con 12 adicións e 0 borrados
  1. 12 0
      tests/test_state.py

+ 12 - 0
tests/test_state.py

@@ -0,0 +1,12 @@
+from qcgpu import State
+import pytest
+
+def test_state_creation():
+    # Any machine should be able to handle 14 qubits
+    for i in range(1, 15):
+        State(i)
+
+def test_state_with_no_qubits_fails():
+    with pytest.raises(Exception):
+        State(0)
+