From 818bc8eabcac8aac3116faae4b189ca6c3853141 Mon Sep 17 00:00:00 2001
From: zooko <zooko@zooko.com>
Date: Fri, 25 Jul 2008 22:56:00 +0530
Subject: [PATCH] add a test for instantiating Encoder with absent arguments

darcs-hash:dfec6b0ed248ec65732c9bfdfeff84ff14dd0bed
---
 zfec/zfec/test/test_zfec.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/zfec/zfec/test/test_zfec.py b/zfec/zfec/test/test_zfec.py
index 7ed3c13..31c9a02 100755
--- a/zfec/zfec/test/test_zfec.py
+++ b/zfec/zfec/test/test_zfec.py
@@ -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())
             
-- 
2.45.2