aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'portage_with_autodep/pym/portage/tests/env/config/test_PackageUseFile.py')
-rw-r--r--portage_with_autodep/pym/portage/tests/env/config/test_PackageUseFile.py37
1 files changed, 0 insertions, 37 deletions
diff --git a/portage_with_autodep/pym/portage/tests/env/config/test_PackageUseFile.py b/portage_with_autodep/pym/portage/tests/env/config/test_PackageUseFile.py
deleted file mode 100644
index 7a38067..0000000
--- a/portage_with_autodep/pym/portage/tests/env/config/test_PackageUseFile.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# test_PackageUseFile.py -- Portage Unit Testing Functionality
-# Copyright 2007 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-from portage import os
-from portage.tests import TestCase
-from portage.env.config import PackageUseFile
-from tempfile import mkstemp
-
-
-class PackageUseFileTestCase(TestCase):
-
- cpv = 'sys-apps/portage'
- useflags = ['cdrom', 'far', 'boo', 'flag', 'blat']
-
- def testPackageUseFile(self):
- """
- A simple test to ensure the load works properly
- """
- self.BuildFile()
- try:
- f = PackageUseFile(self.fname)
- f.load()
- for cpv, use in f.items():
- self.assertEqual( cpv, self.cpv )
- [flag for flag in use if self.assertTrue(flag in self.useflags)]
- finally:
- self.NukeFile()
-
- def BuildFile(self):
- fd, self.fname = mkstemp()
- f = os.fdopen(fd, 'w')
- f.write("%s %s" % (self.cpv, ' '.join(self.useflags)))
- f.close()
-
- def NukeFile(self):
- os.unlink(self.fname)