diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-08-30 22:00:44 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-08-30 22:00:44 -0700 |
commit | 4adfd4490bc9c683a966afa386ac96a83b1d96aa (patch) | |
tree | 63096bea1629e76bf5a94dfc6e1899040fde9604 | |
parent | 26e57cd28c43074b4eca54fb11ee1ab3497a1530 (diff) | |
download | portage-4adfd4490bc9c683a966afa386ac96a83b1d96aa.tar.gz portage-4adfd4490bc9c683a966afa386ac96a83b1d96aa.tar.bz2 portage-4adfd4490bc9c683a966afa386ac96a83b1d96aa.zip |
Add testcase to check that features_set._prune_overrides() is working
correctly.
-rw-r--r-- | pym/portage/tests/ebuild/test_config.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pym/portage/tests/ebuild/test_config.py b/pym/portage/tests/ebuild/test_config.py index f48717d4f..b12605aac 100644 --- a/pym/portage/tests/ebuild/test_config.py +++ b/pym/portage/tests/ebuild/test_config.py @@ -13,7 +13,8 @@ class ConfigTestCase(TestCase): def testFeaturesMutation(self): """ Test whether mutation of config.features updates the FEATURES - variable and persists through config.regenerate() calls. + variable and persists through config.regenerate() calls. Also + verify that features_set._prune_overrides() works correctly. """ playground = ResolverPlayground() try: @@ -33,6 +34,12 @@ class ConfigTestCase(TestCase): self.assertEqual('noclean' in settings['FEATURES'].split(), True) settings.regenerate() self.assertEqual('noclean' in settings['FEATURES'].split(),True) + + # before: ['noclean', '-noclean', 'noclean'] + settings.features._prune_overrides() + # after: ['noclean'] + self.assertEqual(settings._features_overrides.count('noclean'), 1) + self.assertEqual(settings._features_overrides.count('-noclean'), 0) finally: playground.cleanup() |