summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlec Warner <antarus@gentoo.org>2007-01-11 19:49:24 +0000
committerAlec Warner <antarus@gentoo.org>2007-01-11 19:49:24 +0000
commitbd12043aa5f8945352f9c50d0d7768ddaefea00c (patch)
treebd750621a2359d7821947df0c0ebd4cb449499cc
parent230271398ae96229f7d5aff160d5d5ea6b5db3e1 (diff)
downloadportage-bd12043aa5f8945352f9c50d0d7768ddaefea00c.tar.gz
portage-bd12043aa5f8945352f9c50d0d7768ddaefea00c.tar.bz2
portage-bd12043aa5f8945352f9c50d0d7768ddaefea00c.zip
I owed brian harring 3.50, for th previous advice about assertEqual/NotEqual, oh, add dep_getcpv tests too
svn path=/main/trunk/; revision=5561
-rw-r--r--tests/portage_dep/test_dep_getcpv.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/portage_dep/test_dep_getcpv.py b/tests/portage_dep/test_dep_getcpv.py
new file mode 100644
index 000000000..6928794a4
--- /dev/null
+++ b/tests/portage_dep/test_dep_getcpv.py
@@ -0,0 +1,25 @@
+# test_dep_getcpv.py -- Portage Unit Testing Functionality
+# Copyright 2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id: test_atoms.py 5525 2007-01-10 13:35:03Z antarus $
+
+from unittest import TestCase
+from portage_dep import dep_getcpv
+
+class DepGetCPV(TestCase):
+ """ A simple testcase for isvalidatom
+ """
+
+ def testDepGetCPV(self):
+
+ prefix_ops = ["<", ">", "=", "~", "!", "<=",
+ ">=", "!=", "!<", "!>", "!~",""]
+ postfix_ops = [ "*", "" ]
+
+ cpvs = ["sys-apps/portage"]
+
+ for cpv in cpvs:
+ for prefix in prefix_ops:
+ for postfix in postfix_ops:
+ self.assertEqual( dep_getcpv(
+ prefix + cpv + postfix ), cpv )