From 6c11c740c53bf3fb6c500de654088e9987ed2895 Mon Sep 17 00:00:00 2001 From: zooko <zooko@zooko.com> Date: Fri, 25 Jul 2008 22:57:36 +0530 Subject: [PATCH] add test for instantiating Decoder with no args darcs-hash:45f89755404533455388318289b3a714f74ac638 --- zfec/zfec/test/test_zfec.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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()) -- 2.45.2