From 1e1ca87c5edcb501336df5791fbbcd43d3141cc8 Mon Sep 17 00:00:00 2001 From: Adam Kelly Date: Wed, 18 Jan 2017 18:58:47 +0000 Subject: [PATCH] More Tests --- test.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test.py b/test.py index 8f38a23..96efbf6 100644 --- a/test.py +++ b/test.py @@ -43,6 +43,15 @@ def testCNOT(self): self.assertEqual(CNOT2.measure(), '0010001000') self.assertEqual(CNOT3.measure(), '001000000') + def testRemeasure(self): + self.assertEqual(CNOT1.measure(), '0000000000') + self.assertEqual(CNOT2.measure(), '0010001000') + self.assertEqual(CNOT3.measure(), '001000000') + + def testReapplyGate(self): + with self.assertRaises(ValueError): + CNOT1.applyGate('X', 4) + def main(): unittest.main()