| Trees | Indices | Help |
|
|---|
|
|
1 # test_PackageUseFile.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 import os 6 from portage.tests import TestCase 7 from portage.env.config import PackageUseFile 8 from tempfile import mkstemp 9 1012 13 cpv = 'sys-apps/portage' 14 useflags = ['cdrom', 'far', 'boo', 'flag', 'blat'] 153817 """ 18 A simple test to ensure the load works properly 19 """ 20 self.BuildFile() 21 try: 22 f = PackageUseFile(self.fname) 23 f.load() 24 for cpv, use in f.items(): 25 self.assertEqual(cpv, self.cpv) 26 [flag for flag in use if self.assertTrue(flag in self.useflags)] 27 finally: 28 self.NukeFile()2931 fd, self.fname = mkstemp() 32 f = os.fdopen(fd, 'w') 33 f.write("%s %s" % (self.cpv, ' '.join(self.useflags))) 34 f.close()35
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Sat May 18 16:59:32 2013 | http://epydoc.sourceforge.net |