Package portage :: Package tests :: Package util :: Module test_stackLists
[hide private]

Source Code for Module portage.tests.util.test_stackLists

 1  # test_stackLists.py -- Portage Unit Testing Functionality 
 2  # Copyright 2006-2012 Gentoo Foundation 
 3  # Distributed under the terms of the GNU General Public License v2 
 4   
 5  from portage.tests import TestCase 
 6  from portage.util import stack_lists 
 7   
8 -class StackListsTestCase(TestCase):
9
10 - def testStackLists(self):
11 12 tests = [ 13 ([['a', 'b', 'c'], ['d', 'e', 'f']], ['a', 'c', 'b', 'e', 'd', 'f'], False), 14 ([['a', 'x'], ['b', 'x']], ['a', 'x', 'b'], False), 15 ([['a', 'b', 'c'], ['-*']], [], True), 16 ([['a'], ['-a']], [], True) 17 ] 18 19 for test in tests: 20 result = stack_lists(test[0], test[2]) 21 self.assertEqual(set(result), set(test[1]))
22