add test for instantiating Decoder with no args
authorzooko <zooko@zooko.com>
Fri, 25 Jul 2008 17:27:36 +0000 (22:57 +0530)
committerzooko <zooko@zooko.com>
Fri, 25 Jul 2008 17:27:36 +0000 (22:57 +0530)
darcs-hash:45f89755404533455388318289b3a714f74ac638

zfec/zfec/test/test_zfec.py

index 31c9a02b4012889c5cfc70fc7386554091141f4f..46bbb1cb6bbdeaf8c12a2982a5c326ceafcf02f4 100755 (executable)
@@ -79,7 +79,7 @@ def _help_test_random_with_l_easy(l):
     _h_easy(k, m, s)
 
 class ZFecTest(unittest.TestCase):
-    def test_instantiate_no_args(self):
+    def test_instantiate_encoder_no_args(self):
         try:
             e = zfec.Encoder()
         except TypeError:
@@ -89,6 +89,16 @@ class ZFecTest(unittest.TestCase):
             # Oops, it should have raised an exception.
             self.fail("Should have raised exception from incorrect arguments to constructor.")
 
+    def test_instantiate_decoder_no_args(self):
+        try:
+            e = zfec.Decoder()
+        except TypeError:
+            # Okay, so that's because we're required to pass constructor args.
+            pass
+        else:
+            # Oops, it should have raised an exception.
+            self.fail("Should have raised exception from incorrect arguments to constructor.")
+
     def test_from_agl_c(self):
         self.failUnless(zfec._fec.test_from_agl())