From: zooko Date: Fri, 25 Jul 2008 17:26:00 +0000 (+0530) Subject: add a test for instantiating Encoder with absent arguments X-Git-Url: https://git.rkrishnan.org/specifications/components/index.php?a=commitdiff_plain;h=818bc8eabcac8aac3116faae4b189ca6c3853141;p=tahoe-lafs%2Fzfec.git add a test for instantiating Encoder with absent arguments darcs-hash:dfec6b0ed248ec65732c9bfdfeff84ff14dd0bed --- 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())