aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'pym/portage/tests/util/test_stackDicts.py')
-rw-r--r--pym/portage/tests/util/test_stackDicts.py41
1 files changed, 19 insertions, 22 deletions
diff --git a/pym/portage/tests/util/test_stackDicts.py b/pym/portage/tests/util/test_stackDicts.py
index 0d2cadd0c..0c1dcdb78 100644
--- a/pym/portage/tests/util/test_stackDicts.py
+++ b/pym/portage/tests/util/test_stackDicts.py
@@ -7,30 +7,27 @@ from portage.util import stack_dicts
class StackDictsTestCase(TestCase):
-
- def testStackDictsPass(self):
-
- tests = [ ( [ { "a":"b" }, { "b":"c" } ], { "a":"b", "b":"c" },
- False, [], False ),
- ( [ { "a":"b" }, { "a":"c" } ], { "a":"b c" },
- True, [], False ),
- ( [ { "a":"b" }, { "a":"c" } ], { "a":"b c" },
- False, ["a"], False ),
- ( [ { "a":"b" }, None ], { "a":"b" },
- False, [], True ),
- ( [ None ], {}, False, [], False ),
- ( [ None, {}], {}, False, [], True ) ]
+ def testStackDictsPass(self):
+ tests = [
+ ([{'a': 'b'}, {'b': 'c'}], {'a': 'b', 'b': 'c'}, False, [], False),
+ ([{'a': 'b'}, {'a': 'c'}], {'a': 'b c'}, True, [], False),
+ ([{'a': 'b'}, {'a': 'c'}], {'a': 'b c'}, False, ['a'], False),
+ ([{'a': 'b'}, None], {'a': 'b'}, False, [], True),
+ ([None], {}, False, [], False),
+ ([None, {}], {}, False, [], True)
+ ]
for test in tests:
- result = stack_dicts( test[0], test[2], test[3], test[4] )
- self.assertEqual( result, test[1] )
-
+ result = stack_dicts(test[0], test[2], test[3], test[4])
+ self.assertEqual(result, test[1])
+
def testStackDictsFail(self):
-
- tests = [ ( [ None, {} ], None, False, [], True ),
- ( [ { "a":"b"}, {"a":"c" } ], { "a":"b c" },
- False, [], False ) ]
+
+ tests = [
+ ([None, {}], None, False, [], True),
+ ([{'a': 'b'}, {'a': 'c'}], {'a': 'b c'}, False, [], False)
+ ]
for test in tests:
- result = stack_dicts( test[0], test[2], test[3], test[4] )
- self.assertNotEqual( result , test[1] )
+ result = stack_dicts(test[0], test[2], test[3], test[4])
+ self.assertNotEqual(result, test[1])