Package portage :: Package tests :: Package sets :: Package shell :: Module testShell
[hide private]

Source Code for Module portage.tests.sets.shell.testShell

 1  # testCommandOututSet.py -- Portage Unit Testing Functionality 
 2  # Copyright 2007 Gentoo Foundation 
 3  # Distributed under the terms of the GNU General Public License v2 
 4   
 5  from portage.process import find_binary 
 6  from portage.tests import TestCase, test_cps 
 7  from portage._sets.shell import CommandOutputSet 
 8   
9 -class CommandOutputSetTestCase(TestCase):
10 """Simple Test Case for CommandOutputSet""" 11
12 - def setUp(self):
13 pass
14
15 - def tearDown(self):
16 pass
17
18 - def testCommand(self):
19 20 input = set(test_cps) 21 command = find_binary("bash") 22 command += " -c '" 23 for a in input: 24 command += " echo -e \"%s\" ; " % a 25 command += "'" 26 s = CommandOutputSet(command) 27 atoms = s.getAtoms() 28 self.assertEqual(atoms, input)
29