diff options
author | Alec Warner <antarus@gentoo.org> | 2007-01-27 18:16:08 +0000 |
---|---|---|
committer | Alec Warner <antarus@gentoo.org> | 2007-01-27 18:16:08 +0000 |
commit | 6ac1f119472d2e41650f4cf7a9bdb17a3afda42c (patch) | |
tree | d993452f7ea513226b6fa4f6fd1ce130796a2914 /tests/portage_dep/test_isvalidatom.py | |
parent | 8a4a1ddb2255979e94ba5dd0148c4bbfd4920e57 (diff) | |
download | portage-6ac1f119472d2e41650f4cf7a9bdb17a3afda42c.tar.gz portage-6ac1f119472d2e41650f4cf7a9bdb17a3afda42c.tar.bz2 portage-6ac1f119472d2e41650f4cf7a9bdb17a3afda42c.zip |
Move tests into new directory structure
svn path=/main/trunk/; revision=5794
Diffstat (limited to 'tests/portage_dep/test_isvalidatom.py')
-rw-r--r-- | tests/portage_dep/test_isvalidatom.py | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/tests/portage_dep/test_isvalidatom.py b/tests/portage_dep/test_isvalidatom.py deleted file mode 100644 index d373a52f0..000000000 --- a/tests/portage_dep/test_isvalidatom.py +++ /dev/null @@ -1,36 +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 ), - ( ">~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] ) ) |