summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorSebastian Luther <SebastianLuther@gmx.de>2010-08-11 07:16:23 +0200
committerZac Medico <zmedico@gentoo.org>2010-08-10 22:31:02 -0700
commit67f3bef9efeff7061765edc9515a97143c2f2e55 (patch)
treeb74b862f0b13cf366003c9d1a126ec919317ae27 /pym
parenta512a69eaa8abecd315ceefba75e7e62b43d1183 (diff)
downloadportage-67f3bef9efeff7061765edc9515a97143c2f2e55.tar.gz
portage-67f3bef9efeff7061765edc9515a97143c2f2e55.tar.bz2
portage-67f3bef9efeff7061765edc9515a97143c2f2e55.zip
Tests: Remove paren_reduce tests
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/tests/dep/test_paren_reduce.py60
1 files changed, 0 insertions, 60 deletions
diff --git a/pym/portage/tests/dep/test_paren_reduce.py b/pym/portage/tests/dep/test_paren_reduce.py
deleted file mode 100644
index bd5f42584..000000000
--- a/pym/portage/tests/dep/test_paren_reduce.py
+++ /dev/null
@@ -1,60 +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 paren_reduce
-from portage.exception import InvalidDependString
-
-class TestParenReduce(TestCase):
-
- def testParenReduce(self):
-
- test_cases = (
- ( "A", ["A"]),
- ( "( A )", ["A"]),
- ( "|| ( A B )", [ "||", ["A", "B"] ]),
- ( "|| ( A || ( B C ) )", [ "||", ["A", "||", ["B", "C"]]]),
- ( "|| ( A || ( B C D ) )", [ "||", ["A", "||", ["B", "C", "D"]] ]),
- ( "|| ( A || ( B || ( C D ) E ) )", [ "||", ["A", "||", ["B", "||", ["C", "D"], "E"]] ]),
- ( "a? ( A )", ["a?", ["A"]]),
-
- ( "( || ( ( ( A ) B ) ) )", [ "||", ["A", "B"] ]),
- ( "( || ( || ( ( A ) B ) ) )", [ "||", ["A", "B"] ]),
- ( "( || ( || ( ( A ) B ) ) )", [ "||", ["A", "B"] ]),
- ( "|| ( A )", ["A"]),
- ( "( || ( || ( || ( A ) foo? ( B ) ) ) )", [ "||", ["A", "foo?", ["B"] ]]),
- ( "( || ( || ( bar? ( A ) || ( foo? ( B ) ) ) ) )", [ "||", ["bar?", ["A"], "foo?", ["B"] ]]),
- ( "A || ( ) foo? ( ) B", ["A", "B"]),
-
- ( "|| ( A ) || ( B )", ["A", "B"]),
- ( "foo? ( A ) foo? ( B )", ["foo?", ["A"], "foo?", ["B"]]),
- )
-
- test_cases_xfail = (
- "( A",
- "A )",
-
- "||( A B )",
- "|| (A B )",
- "|| ( A B)",
- "|| ( A B",
- "|| A B )",
-
- "|| A B",
- "|| ( A B ) )",
- "|| || B C",
-
- "|| ( A B || )",
-
- "a? A",
-
- ( "( || ( || || ( A ) foo? ( B ) ) )"),
- ( "( || ( || bar? ( A ) foo? ( B ) ) )"),
- )
-
- for dep_str, expected_result in test_cases:
- self.assertEqual(paren_reduce(dep_str), expected_result)
-
- for dep_str in test_cases_xfail:
- self.assertRaisesMsg(dep_str,
- InvalidDependString, paren_reduce, dep_str)