diff options
author | Alec Warner <antarus@gentoo.org> | 2007-02-02 00:36:52 +0000 |
---|---|---|
committer | Alec Warner <antarus@gentoo.org> | 2007-02-02 00:36:52 +0000 |
commit | bea49754d557d2b8ef7b23dea5a97636f3cef084 (patch) | |
tree | 19debb4b07cbde1e460d86b9e9b4e0c60a77a152 /pym/portage/tests/dep/test_isjustname.py | |
parent | ef5a5b15f7810d596cc40812275c19db0241e420 (diff) | |
download | portage-bea49754d557d2b8ef7b23dea5a97636f3cef084.tar.gz portage-bea49754d557d2b8ef7b23dea5a97636f3cef084.tar.bz2 portage-bea49754d557d2b8ef7b23dea5a97636f3cef084.zip |
remove redundant directory now
svn path=/main/trunk/; revision=5871
Diffstat (limited to 'pym/portage/tests/dep/test_isjustname.py')
-rw-r--r-- | pym/portage/tests/dep/test_isjustname.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/pym/portage/tests/dep/test_isjustname.py b/pym/portage/tests/dep/test_isjustname.py new file mode 100644 index 000000000..e419e3f26 --- /dev/null +++ b/pym/portage/tests/dep/test_isjustname.py @@ -0,0 +1,25 @@ +# test_isjustname.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 isjustname + +class IsJustName(TestCase): + + def testIsJustName(self): + + cats = ( "", "sys-apps/", "foo/", "virtual/" ) + pkgs = ( "portage", "paludis", "pkgcore", "notARealPkg" ) + vers = ( "", "-2.0-r3", "-1.0_pre2", "-3.1b" ) + + for pkg in pkgs: + for cat in cats: + for ver in vers: + if len(ver): + self.assertFalse( isjustname( cat + pkg + ver ), + msg="isjustname(%s) is True!" % (cat + pkg + ver) ) + else: + self.assertTrue( isjustname( cat + pkg + ver ), + msg="isjustname(%s) is False!" % (cat + pkg + ver) ) |