diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-09-12 15:17:08 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-09-12 15:17:08 +0000 |
commit | d815bb66640bd8eb2ecb15fead650f38ecbd7a56 (patch) | |
tree | 91ee65dbe3daa777a402d9a65e630a9b4e0d5ddc | |
parent | 2f970abe35172e0af65caccae4055a7bc7afa367 (diff) | |
download | portage-d815bb66640bd8eb2ecb15fead650f38ecbd7a56.tar.gz portage-d815bb66640bd8eb2ecb15fead650f38ecbd7a56.tar.bz2 portage-d815bb66640bd8eb2ecb15fead650f38ecbd7a56.zip |
Fix poor assumptions.
svn path=/main/trunk/; revision=14228
-rw-r--r-- | pym/portage/tests/dep/test_get_operator.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/pym/portage/tests/dep/test_get_operator.py b/pym/portage/tests/dep/test_get_operator.py index f93c2776f..fec6223a5 100644 --- a/pym/portage/tests/dep/test_get_operator.py +++ b/pym/portage/tests/dep/test_get_operator.py @@ -12,11 +12,10 @@ class GetOperator(TestCase): # get_operator does not validate operators tests = [ ( "~", "~" ), ( "=", "=" ), ( ">", ">" ), - ( ">=", ">=" ), ( "<=", "<=" ) , ( "", None ), - ( ">~", ">" ), ("~<", "~"), ( "=~", "=" ), - ( "=>", "=" ), ("=<", "=") ] + ( ">=", ">=" ), ( "<=", "<=" ), + ] - test_cpvs = ["sys-apps/portage","sys-apps/portage-2.1"] + test_cpvs = ["sys-apps/portage-2.1"] slots = [ None,"1","linux-2.5.6" ] for cpv in test_cpvs: for test in tests: @@ -25,7 +24,11 @@ class GetOperator(TestCase): if slot: atom += ":" + slot result = get_operator( test[0] + atom ) - self.assertEqual( result, test[1] ) + self.assertEqual( result, test[1], + msg="get_operator(%s) != %s" % (test[0] + atom, test[1]) ) - result = get_operator( "=sys-apps/portage*" ) + result = get_operator( "sys-apps/portage" ) + self.assertEqual( result, None ) + + result = get_operator( "=sys-apps/portage-2.1*" ) self.assertEqual( result , "=*" ) |