소스 검색

Added more tests

Adam Kelly 6 년 전
부모
커밋
7ad739b6da
1개의 변경된 파일12개의 추가작업 그리고 0개의 파일을 삭제
  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)
+