diff options
Diffstat (limited to 'tests/portage/dep/test_isvalidatom.py')
-rw-r--r-- | tests/portage/dep/test_isvalidatom.py | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/tests/portage/dep/test_isvalidatom.py b/tests/portage/dep/test_isvalidatom.py deleted file mode 100644 index 88250e96c..000000000 --- a/tests/portage/dep/test_isvalidatom.py +++ /dev/null @@ -1,38 +0,0 @@ -# test_isvalidatom.py -- Portage Unit Testing Functionality -# Copyright 2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -from unittest import TestCase -from portage.dep import isvalidatom - -class IsValidAtom(TestCase): - """ A simple testcase for isvalidatom - """ - - def testIsValidAtom(self): - - tests = [ ( "sys-apps/portage", True ), - ( "=sys-apps/portage-2.1", True ), - ( "=sys-apps/portage-2.1*", True ), - ( ">=sys-apps/portage-2.1", True ), - ( "<=sys-apps/portage-2.1", True ), - ( ">sys-apps/portage-2.1", True ), - ( "<sys-apps/portage-2.1", True ), - ( "~sys-apps/portage-2.1", True ), - ( "sys-apps/portage-2.1:foo", True ), - ( "sys-apps/portage-2.1:", False ), - ( ">~cate-gory/foo-1.0", False ), - ( ">~category/foo-1.0", False ), - ( "<~category/foo-1.0", False ), - ( "###cat/foo-1.0", False ), - ( "~sys-apps/portage", False ), - ( "portage", False ) ] - - for test in tests: - if test[1]: - atom_type = "valid" - else: - atom_type = "invalid" - self.assertEqual( bool(isvalidatom( test[0] )), test[1], - msg="isvalidatom(%s) != %s" % ( test[0], test[1] ) ) |