[Zope-CVS] CVS: Products/Ape/apelib/tests - testall.py:1.2 testimpl.py:1.2 testsqlimpl.py:1.2 zope2testbase.py:1.2
Shane Hathaway
shane@zope.com
Sat, 15 Mar 2003 20:14:17 -0500
Update of /cvs-repository/Products/Ape/apelib/tests
In directory cvs.zope.org:/tmp/cvs-serv12186/apelib/tests
Modified Files:
testall.py testimpl.py testsqlimpl.py zope2testbase.py
Log Message:
Corrected documentation and circumvented a bug involving relative imports of the apelib module.
=== Products/Ape/apelib/tests/testall.py 1.1.1.1 => 1.2 ===
--- Products/Ape/apelib/tests/testall.py:1.1.1.1 Sat Mar 15 18:44:39 2003
+++ Products/Ape/apelib/tests/testall.py Sat Mar 15 20:13:46 2003
@@ -27,7 +27,8 @@
import apelib
except ImportError:
# The Ape product makes apelib available as a top-level package.
- from Products.Ape import apelib
+ import Products.Ape
+ import apelib
from testserialization import SerializationTests
from testimpl import ApelibImplTests
=== Products/Ape/apelib/tests/testimpl.py 1.1.1.1 => 1.2 ===
--- Products/Ape/apelib/tests/testimpl.py:1.1.1.1 Sat Mar 15 18:44:39 2003
+++ Products/Ape/apelib/tests/testimpl.py Sat Mar 15 20:13:46 2003
@@ -31,7 +31,7 @@
impl = c.__implements__
self._verify(impl, c)
except:
- print 'Bad implementation of', repr(c)
+ print '%s incorrectly implements %s' % (repr(c), repr(impl))
raise
def _testAllInModule(self, m):
@@ -41,9 +41,9 @@
self._testObjectImpl(value)
def _testAllInPackage(self, p):
+ seen = {'__init__': 1}
for path in p.__path__:
names = os.listdir(path)
- seen = {'__init__': 1}
for name in names:
base, ext = os.path.splitext(name)
ext = ext.lower()
@@ -73,15 +73,15 @@
def testZope2Implementations(self):
import apelib.zope2
- self._testAllInModule(apelib.zope2)
+ self._testAllInPackage(apelib.zope2)
def testFSImplementations(self):
import apelib.fs
- self._testAllInModule(apelib.fs)
+ self._testAllInPackage(apelib.fs)
def testZODB3Implementations(self):
import apelib.zodb3
- self._testAllInModule(apelib.zodb3)
+ self._testAllInPackage(apelib.zodb3)
if __name__ == '__main__':
unittest.main()
=== Products/Ape/apelib/tests/testsqlimpl.py 1.1.1.1 => 1.2 ===
--- Products/Ape/apelib/tests/testsqlimpl.py:1.1.1.1 Sat Mar 15 18:44:40 2003
+++ Products/Ape/apelib/tests/testsqlimpl.py Sat Mar 15 20:13:46 2003
@@ -25,7 +25,7 @@
def testSQLImplementations(self):
import apelib.sql
- self._testAllInModule(apelib.sql)
+ self._testAllInPackage(apelib.sql)
if __name__ == '__main__':
unittest.main()
=== Products/Ape/apelib/tests/zope2testbase.py 1.1.1.1 => 1.2 ===
--- Products/Ape/apelib/tests/zope2testbase.py:1.1.1.1 Sat Mar 15 18:44:41 2003
+++ Products/Ape/apelib/tests/zope2testbase.py Sat Mar 15 20:13:46 2003
@@ -31,7 +31,7 @@
from Products.ZSQLMethods.SQL import manage_addZSQLMethod
from Products.PageTemplates.ZopePageTemplate import ZopePageTemplate
-from Products.Ape.patches import applySetObPatch
+from apelib.zope2.setup.patches import applySetObPatch
class TestFolder(Folder):