aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'portage_with_autodep/pym/portage/tests/dep/test_get_required_use_flags.py')
-rw-r--r--portage_with_autodep/pym/portage/tests/dep/test_get_required_use_flags.py42
1 files changed, 0 insertions, 42 deletions
diff --git a/portage_with_autodep/pym/portage/tests/dep/test_get_required_use_flags.py b/portage_with_autodep/pym/portage/tests/dep/test_get_required_use_flags.py
deleted file mode 100644
index 06f8110..0000000
--- a/portage_with_autodep/pym/portage/tests/dep/test_get_required_use_flags.py
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright 2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-from portage.tests import TestCase
-from portage.dep import get_required_use_flags
-from portage.exception import InvalidDependString
-
-class TestCheckRequiredUse(TestCase):
-
- def testCheckRequiredUse(self):
- test_cases = (
- ("a b c", ["a", "b", "c"]),
-
- ("|| ( a b c )", ["a", "b", "c"]),
- ("^^ ( a b c )", ["a", "b", "c"]),
-
- ("|| ( a b ^^ ( d e f ) )", ["a", "b", "d", "e", "f"]),
- ("^^ ( a b || ( d e f ) )", ["a", "b", "d", "e", "f"]),
-
- ("( ^^ ( a ( b ) ( || ( ( d e ) ( f ) ) ) ) )", ["a", "b", "d", "e", "f"]),
-
- ("a? ( ^^ ( b c ) )", ["a", "b", "c"]),
- ("a? ( ^^ ( !b !d? ( c ) ) )", ["a", "b", "c", "d"]),
- )
-
- test_cases_xfail = (
- ("^^ ( || ( a b ) ^^ ( b c )"),
- ("^^( || ( a b ) ^^ ( b c ) )"),
- ("^^ || ( a b ) ^^ ( b c )"),
- ("^^ ( ( || ) ( a b ) ^^ ( b c ) )"),
- ("^^ ( || ( a b ) ) ^^ ( b c ) )"),
- )
-
- for required_use, expected in test_cases:
- result = get_required_use_flags(required_use)
- expected = set(expected)
- self.assertEqual(result, expected, \
- "REQUIRED_USE: '%s', expected: '%s', got: '%s'" % (required_use, expected, result))
-
- for required_use in test_cases_xfail:
- self.assertRaisesMsg("REQUIRED_USE: '%s'" % (required_use,), \
- InvalidDependString, get_required_use_flags, required_use)