From: zooko Date: Fri, 25 Jul 2008 17:27:36 +0000 (+0530) Subject: add test for instantiating Decoder with no args X-Git-Url: https://git.rkrishnan.org/pf/content/en/seg/priv/prod.html?a=commitdiff_plain;h=6c11c740c53bf3fb6c500de654088e9987ed2895;p=tahoe-lafs%2Fzfec.git add test for instantiating Decoder with no args darcs-hash:45f89755404533455388318289b3a714f74ac638 --- diff --git a/zfec/zfec/test/test_zfec.py b/zfec/zfec/test/test_zfec.py index 31c9a02..46bbb1c 100755 --- a/zfec/zfec/test/test_zfec.py +++ b/zfec/zfec/test/test_zfec.py @@ -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())