Merged from trunk 5933:5935
authorFabian Groffen <grobian@gentoo.org>
Sat, 10 Feb 2007 12:50:42 +0000 (12:50 -0000)
committerFabian Groffen <grobian@gentoo.org>
Sat, 10 Feb 2007 12:50:42 +0000 (12:50 -0000)
update test notes (WarnerBro)

fix a few broken tests (WarnerBro)

svn path=/main/branches/prefix/; revision=5937

TEST-NOTES
pym/portage/tests/__init__.py
pym/portage/tests/dep/test_dep_getusedeps.py
pym/portage/tests/dep/test_get_operator.py

index 82f3423101fda4d6323054e637c3035cbdc7e863..32db45a6d9fff2e2b261b27ec65e899b7a50972c 100644 (file)
@@ -4,7 +4,7 @@ UnitTests
 Portage has some tests that use the unittest framework that ships with python (2.3-2.4ish)
 Tests have a specific naming convention.
 
-in tests/ there is a runTest script that invokes tests/__init__.py
+in pym/portage/tests/ there is a runTest script that invokes pym/portage/tests/__init__.py
 
 This init looks at a hardcoded list of test dirs to search for tests.
 If you add a new dir and don't see your new tests, make sure that the dir is in this list.
@@ -15,13 +15,18 @@ you should have files of the form test_${function}.py.
 
 So if I was to write a vercmp test, and vercmp is in portage_versions.
 
-tests/portage_versions/test_vercmp.py
+pym/portage/tests/portage_versions/test_vercmp.py
 
 would be the filename.
 
 The __init__.py file now does recursive tests, but you need to tell it so.  For example, if
 you had cache tests the dir format would be something like...
 
-tests/cache/flat_hash/test_foo.py
+pym/portage/tests/cache/flat_hash/test_foo.py
 
 and you would put "cache/flat_hash" into the testDirs variable in __init__.py.
+
+emerge
+------
+
+The emerge namespace currently has 0 tests (and no runner)
index 3a881348a8bf99b54c412c8551fb1d9f60c8ef16..5a69ae3ed4629e33627f8762ee0ba1419fc26390 100644 (file)
@@ -49,7 +49,7 @@ def getTests( path, base_path ):
                        raise
        return result
 
-test_cpvs = ['sys-apps/portage','virtual/portage']
+test_cps = ['sys-apps/portage','virtual/portage']
 test_versions = ['1.0', '1.0-r1','2.3_p4','1.0_alpha57']
 test_slots = [ None, '1','gentoo-sources-2.6.17','spankywashere']
 test_usedeps = ['foo','-bar', ['foo','bar'],['foo','-bar'] ]
index d191d43ccc5d27ab16f03b12f160d051e5cee152..309c659f5edc36bb586384a67d06302d09df54cd 100644 (file)
@@ -7,7 +7,7 @@ from unittest import TestCase
 from portage.dep import dep_getusedeps
 
 import sys
-from portage.tests import test_cpvs, test_slots, test_versions, test_usedeps
+from portage.tests import test_cps, test_slots, test_versions, test_usedeps
 
 class DepGetUseDeps(TestCase):
        """ A simple testcase for dep_getusedeps
@@ -15,8 +15,7 @@ class DepGetUseDeps(TestCase):
 
        def testDepGetUseDeps(self):
 
-
-               for mycpv in test_cpvs:
+               for mycpv in test_cps:
                        for version in test_versions:
                                for slot in test_slots:
                                        for use in test_usedeps:
index b41fab0d5120fe2613bd3c67ed224ec84aebc4f7..e5b5b7e6cbfdb8ae069a080ff90e7d7cec8ba85c 100644 (file)
@@ -1,5 +1,5 @@
-# test_match_from_list.py -- Portage Unit Testing Functionality
-# Copyright 2006 Gentoo Foundation
+# test_get_operator.py -- Portage Unit Testing Functionality
+# Copyright 2007 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$