]> git.rkrishnan.org Git - tahoe-lafs/zfec.git/blobdiff - zfec/zfec/test/test_zfec.py
add a test for instantiating Encoder with absent arguments
[tahoe-lafs/zfec.git] / zfec / zfec / test / test_zfec.py
index 7ed3c13ea47a2dc41bf90ea5838a3454cd45702c..31c9a02b4012889c5cfc70fc7386554091141f4f 100755 (executable)
@@ -79,6 +79,16 @@ def _help_test_random_with_l_easy(l):
     _h_easy(k, m, s)
 
 class ZFecTest(unittest.TestCase):
+    def test_instantiate_no_args(self):
+        try:
+            e = zfec.Encoder()
+        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())