diff options
author | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2013-04-03 00:42:05 +0200 |
---|---|---|
committer | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2013-04-03 00:42:05 +0200 |
commit | 4c0d0650610e154499511d27268ed7c1d32b60db (patch) | |
tree | 547ad7ec93438b2513d403138be3f0de0e9fdaf7 /tests/test_declarations.py | |
parent | 6532f25058a13e81b1365bb353848510821f571f (diff) | |
download | factory-boy-4c0d0650610e154499511d27268ed7c1d32b60db.tar factory-boy-4c0d0650610e154499511d27268ed7c1d32b60db.tar.gz |
internal: merge OrderedDeclaration.evaluate() variants.
Diffstat (limited to 'tests/test_declarations.py')
-rw-r--r-- | tests/test_declarations.py | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/test_declarations.py b/tests/test_declarations.py index b7ae344..7b9b0af 100644 --- a/tests/test_declarations.py +++ b/tests/test_declarations.py @@ -33,7 +33,7 @@ from . import tools class OrderedDeclarationTestCase(unittest.TestCase): def test_errors(self): decl = declarations.OrderedDeclaration() - self.assertRaises(NotImplementedError, decl.evaluate, None, {}) + self.assertRaises(NotImplementedError, decl.evaluate, None, {}, False) class DigTestCase(unittest.TestCase): @@ -95,23 +95,23 @@ class SelfAttributeTestCase(unittest.TestCase): class IteratorTestCase(unittest.TestCase): def test_cycle(self): it = declarations.Iterator([1, 2]) - self.assertEqual(1, it.evaluate(0, None)) - self.assertEqual(2, it.evaluate(1, None)) - self.assertEqual(1, it.evaluate(2, None)) - self.assertEqual(2, it.evaluate(3, None)) + self.assertEqual(1, it.evaluate(0, None, False)) + self.assertEqual(2, it.evaluate(1, None, False)) + self.assertEqual(1, it.evaluate(2, None, False)) + self.assertEqual(2, it.evaluate(3, None, False)) def test_no_cycling(self): it = declarations.Iterator([1, 2], cycle=False) - self.assertEqual(1, it.evaluate(0, None)) - self.assertEqual(2, it.evaluate(1, None)) - self.assertRaises(StopIteration, it.evaluate, 2, None) + self.assertEqual(1, it.evaluate(0, None, False)) + self.assertEqual(2, it.evaluate(1, None, False)) + self.assertRaises(StopIteration, it.evaluate, 2, None, False) def test_getter(self): it = declarations.Iterator([(1, 2), (1, 3)], getter=lambda p: p[1]) - self.assertEqual(2, it.evaluate(0, None)) - self.assertEqual(3, it.evaluate(1, None)) - self.assertEqual(2, it.evaluate(2, None)) - self.assertEqual(3, it.evaluate(3, None)) + self.assertEqual(2, it.evaluate(0, None, False)) + self.assertEqual(3, it.evaluate(1, None, False)) + self.assertEqual(2, it.evaluate(2, None, False)) + self.assertEqual(3, it.evaluate(3, None, False)) class PostGenerationDeclarationTestCase(unittest.TestCase): |