Skip to content
Snippets Groups Projects
Commit e5958e1d authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

more unit tests for CallableGroup

parent 4711e8c9
No related branches found
No related tags found
No related merge requests found
# coding=UTF-8
__version__ = '2.0.25a1'
__version__ = '2.0.25a2'
......@@ -7,6 +7,18 @@ from satella.coding import CallableGroup
class TestCallableGroup(unittest.TestCase):
def test_callable_group_some_raise(self):
cg = CallableGroup(gather=True)
cg.add(lambda: dupa)
cg.add(lambda: 5)
self.assertRaises(NameError, lambda: cg())
cg = CallableGroup(gather=True, swallow_exceptions=True)
cg.add(lambda: dupa)
cg.add(lambda: 5)
self.assertEquals(cg()[1], 5)
self.assertIsInstance(cg()[0], NameError)
def test_callable_group(self):
a = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment