diff options
| author | Chris McDonough <chrism@agendaless.com> | 2009-06-18 22:21:46 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2009-06-18 22:21:46 +0000 |
| commit | c813ee23d905d63c5d32e00d87f108eed36a9e80 (patch) | |
| tree | 662f1d8e1f0d649191a66a96b385b7d95702dc80 | |
| parent | 7f1e1e9918d77958ab7fa5e142883869dbf8dd79 (diff) | |
| download | pyramid-c813ee23d905d63c5d32e00d87f108eed36a9e80.tar.gz pyramid-c813ee23d905d63c5d32e00d87f108eed36a9e80.tar.bz2 pyramid-c813ee23d905d63c5d32e00d87f108eed36a9e80.zip | |
Coverage.
| -rw-r--r-- | repoze/bfg/tests/test_zcml.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/repoze/bfg/tests/test_zcml.py b/repoze/bfg/tests/test_zcml.py index c7a37cd35..b93788663 100644 --- a/repoze/bfg/tests/test_zcml.py +++ b/repoze/bfg/tests/test_zcml.py @@ -958,7 +958,13 @@ class TestRequestOnly(unittest.TestCase): class foo(object): def __init__(self, request, foo=1, bar=2): """ """ - self.assertTrue(self._callFUT(foo), True) + self.assertTrue(self._callFUT(foo)) + + def test_newstyle_class_init_noargs(self): + class foo(object): + def __init__(): + """ """ + self.assertFalse(self._callFUT(foo)) def test_oldstyle_class_no_init(self): class foo: @@ -995,6 +1001,12 @@ class TestRequestOnly(unittest.TestCase): """ """ self.assertTrue(self._callFUT(foo), True) + def test_oldstyle_class_init_noargs(self): + class foo: + def __init__(): + """ """ + self.assertFalse(self._callFUT(foo)) + def test_function_toomanyargs(self): def foo(context, request): """ """ |
