Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zodb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Joshua
zodb
Commits
539a20f6
Commit
539a20f6
authored
May 18, 2010
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use doctest rather than zope.testing.doctest.
parent
6d06232b
Changes
32
Hide whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
60 additions
and
105 deletions
+60
-105
src/BTrees/tests/test_fsBTree.py
src/BTrees/tests/test_fsBTree.py
+1
-1
src/ZEO/scripts/tests.py
src/ZEO/scripts/tests.py
+2
-6
src/ZEO/tests/testConnection.py
src/ZEO/tests/testConnection.py
+2
-2
src/ZEO/tests/testConversionSupport.py
src/ZEO/tests/testConversionSupport.py
+1
-1
src/ZEO/tests/testZEO2.py
src/ZEO/tests/testZEO2.py
+2
-1
src/ZEO/tests/test_cache.py
src/ZEO/tests/test_cache.py
+1
-1
src/ZODB/FileStorage/tests.py
src/ZODB/FileStorage/tests.py
+1
-3
src/ZODB/scripts/tests/test_doc.py
src/ZODB/scripts/tests/test_doc.py
+6
-8
src/ZODB/tests/PackableStorage.py
src/ZODB/tests/PackableStorage.py
+1
-1
src/ZODB/tests/sampledm.py
src/ZODB/tests/sampledm.py
+1
-3
src/ZODB/tests/testBroken.py
src/ZODB/tests/testBroken.py
+1
-3
src/ZODB/tests/testCache.py
src/ZODB/tests/testCache.py
+1
-1
src/ZODB/tests/testConnectionSavepoint.py
src/ZODB/tests/testConnectionSavepoint.py
+2
-6
src/ZODB/tests/testDB.py
src/ZODB/tests/testDB.py
+1
-1
src/ZODB/tests/testDemoStorage.py
src/ZODB/tests/testDemoStorage.py
+8
-8
src/ZODB/tests/testFileStorage.py
src/ZODB/tests/testFileStorage.py
+1
-2
src/ZODB/tests/testSerialize.py
src/ZODB/tests/testSerialize.py
+1
-3
src/ZODB/tests/testUtils.py
src/ZODB/tests/testUtils.py
+2
-2
src/ZODB/tests/test_cache.py
src/ZODB/tests/test_cache.py
+2
-4
src/ZODB/tests/test_datamanageradapter.py
src/ZODB/tests/test_datamanageradapter.py
+1
-4
src/ZODB/tests/test_doctest_files.py
src/ZODB/tests/test_doctest_files.py
+3
-4
src/ZODB/tests/test_fsdump.py
src/ZODB/tests/test_fsdump.py
+1
-1
src/ZODB/tests/testcrossdatabasereferences.py
src/ZODB/tests/testcrossdatabasereferences.py
+2
-5
src/ZODB/tests/testfsoids.py
src/ZODB/tests/testfsoids.py
+1
-2
src/ZODB/tests/testmvcc.py
src/ZODB/tests/testmvcc.py
+1
-1
src/ZODB/tests/testpersistentclass.py
src/ZODB/tests/testpersistentclass.py
+6
-10
src/persistent/tests/test_PickleCache.py
src/persistent/tests/test_PickleCache.py
+1
-5
src/persistent/tests/test_mapping.py
src/persistent/tests/test_mapping.py
+2
-1
src/persistent/tests/test_overriding_attrs.py
src/persistent/tests/test_overriding_attrs.py
+1
-3
src/persistent/tests/test_persistent.py
src/persistent/tests/test_persistent.py
+2
-2
src/persistent/tests/test_pickle.py
src/persistent/tests/test_pickle.py
+1
-6
src/persistent/tests/test_wref.py
src/persistent/tests/test_wref.py
+1
-4
No files found.
src/BTrees/tests/test_fsBTree.py
View file @
539a20f6
...
...
@@ -11,8 +11,8 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
import
doctest
import
unittest
from
zope.testing
import
doctest
def
test_fsbucket_string_conversion
():
"""
...
...
src/ZEO/scripts/tests.py
View file @
539a20f6
...
...
@@ -11,12 +11,8 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""XXX short summary goes here.
$Id$
"""
import
re
,
unittest
from
zope.testing
import
doctest
,
renormalizing
import
doctest
,
re
,
unittest
from
zope.testing
import
renormalizing
def
test_suite
():
return
unittest
.
TestSuite
((
...
...
src/ZEO/tests/testConnection.py
View file @
539a20f6
...
...
@@ -16,9 +16,9 @@
The actual tests are in ConnectionTests.py; this file provides the
platform-dependent scaffolding.
"""
from
ZEO.tests
import
ConnectionTests
,
InvalidationTests
from
zope.testing
import
doctest
,
setupstack
from
zope.testing
import
setupstack
import
doctest
import
unittest
import
ZEO.tests.forker
import
ZEO.tests.testMonitor
...
...
src/ZEO/tests/testConversionSupport.py
View file @
539a20f6
...
...
@@ -11,8 +11,8 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
import
doctest
import
unittest
from
zope.testing
import
doctest
class
FakeStorageBase
:
...
...
src/ZEO/tests/testZEO2.py
View file @
539a20f6
...
...
@@ -11,7 +11,8 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
from
zope.testing
import
doctest
,
setupstack
,
renormalizing
from
zope.testing
import
setupstack
,
renormalizing
import
doctest
import
logging
import
pprint
import
re
...
...
src/ZEO/tests/test_cache.py
View file @
539a20f6
...
...
@@ -14,7 +14,7 @@
"""Basic unit tests for a client cache."""
from
ZODB.utils
import
p64
,
repr_to_oid
from
zope.testing
import
doctest
import
doctest
import
os
import
random
import
string
...
...
src/ZODB/FileStorage/tests.py
View file @
539a20f6
...
...
@@ -11,10 +11,8 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
from
zope.testing
import
doctest
import
cPickle
import
doctest
import
os
import
time
import
transaction
...
...
src/ZODB/scripts/tests/test_doc.py
View file @
539a20f6
...
...
@@ -11,17 +11,15 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""Test harness for scripts.
$Id$
"""
import
unittest
import
doctest
import
re
from
zope.testing
import
doctest
,
renormalizing
import
unittest
import
ZODB.tests.util
import
zope.testing.renormalizing
checker
=
renormalizing
.
RENormalizing
([
(
re
.
compile
(
'[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}
\
.[
0
-9]+'
),
checker
=
zope
.
testing
.
renormalizing
.
RENormalizing
([
(
re
.
compile
(
'[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}
\
.[
0
-9]+'
),
'2007-11-10 15:18:48.543001'
),
(
re
.
compile
(
'hash=[0-9a-f]{40}'
),
'hash=b16422d09fabdb45d4e4325e4b42d7d6f021d3c3'
)])
...
...
src/ZODB/tests/PackableStorage.py
View file @
539a20f6
...
...
@@ -22,8 +22,8 @@ from ZODB.serialize import referencesf
from
ZODB.tests.MinPO
import
MinPO
from
ZODB.tests.MTStorage
import
TestThread
from
ZODB.tests.StorageTestBase
import
snooze
from
zope.testing
import
doctest
import
cPickle
import
doctest
import
time
import
transaction
import
ZODB.interfaces
...
...
src/ZODB/tests/sampledm.py
View file @
539a20f6
...
...
@@ -12,8 +12,6 @@
#
##############################################################################
"""Sample objects for use in tests
$Id$
"""
class
DataManager
(
object
):
...
...
@@ -405,7 +403,7 @@ class Rollback(object):
def
test_suite
():
from
zope.testing.
doctest
import
DocTestSuite
from
doctest
import
DocTestSuite
return
DocTestSuite
()
if
__name__
==
'__main__'
:
...
...
src/ZODB/tests/testBroken.py
View file @
539a20f6
...
...
@@ -12,15 +12,13 @@
#
##############################################################################
"""Test broken-object suppport
$Id$
"""
import
sys
import
unittest
import
persistent
import
transaction
from
zope.testing.
doctest
import
DocTestSuite
from
doctest
import
DocTestSuite
from
ZODB.tests.util
import
DB
def
test_integration
():
...
...
src/ZODB/tests/testCache.py
View file @
539a20f6
...
...
@@ -23,7 +23,7 @@ from persistent import Persistent
from
persistent.mapping
import
PersistentMapping
from
ZODB.tests.MinPO
import
MinPO
from
ZODB.utils
import
p64
from
zope.testing
import
doctest
import
doctest
import
gc
import
threading
import
time
...
...
src/ZODB/tests/testConnectionSavepoint.py
View file @
539a20f6
...
...
@@ -11,14 +11,10 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""Tests of savepoint feature
$Id$
"""
import
unittest
from
zope.testing
import
doctest
import
doctest
import
persistent.mapping
import
transaction
import
unittest
def
testAddingThenModifyThenAbort
():
"""
\
...
...
src/ZODB/tests/testDB.py
View file @
539a20f6
...
...
@@ -13,8 +13,8 @@
##############################################################################
from
ZODB.tests.MinPO
import
MinPO
from
zope.testing
import
doctest
import
datetime
import
doctest
import
os
import
sys
import
time
...
...
src/ZODB/tests/testDemoStorage.py
View file @
539a20f6
...
...
@@ -11,15 +11,7 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
import
unittest
import
random
import
transaction
from
ZODB.DB
import
DB
from
zope.testing
import
doctest
import
ZODB.tests.hexstorage
import
ZODB.tests.util
import
ZODB.utils
import
ZODB.DemoStorage
from
ZODB.tests
import
(
BasicStorage
,
HistoryStorage
,
...
...
@@ -30,6 +22,14 @@ from ZODB.tests import (
StorageTestBase
,
Synchronization
,
)
import
doctest
import
random
import
transaction
import
unittest
import
ZODB.DemoStorage
import
ZODB.tests.hexstorage
import
ZODB.tests.util
import
ZODB.utils
class
DemoStorageTests
(
StorageTestBase
.
StorageTestBase
,
...
...
src/ZODB/tests/testFileStorage.py
View file @
539a20f6
...
...
@@ -12,6 +12,7 @@
#
##############################################################################
import
cPickle
import
doctest
import
os
,
unittest
import
transaction
import
ZODB.FileStorage
...
...
@@ -657,8 +658,6 @@ def pack_with_open_blob_files():
"""
def
test_suite
():
from
zope.testing
import
doctest
suite
=
unittest
.
TestSuite
()
for
klass
in
[
FileStorageTests
,
FileStorageHexTests
,
...
...
src/ZODB/tests/testSerialize.py
View file @
539a20f6
...
...
@@ -11,8 +11,7 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""Tests of the serializer."""
import
doctest
import
cPickle
import
cStringIO
as
StringIO
import
sys
...
...
@@ -121,7 +120,6 @@ class SerializerTestCase(unittest.TestCase):
def
test_suite
():
from
zope.testing
import
doctest
suite
=
unittest
.
makeSuite
(
SerializerTestCase
)
suite
.
addTest
(
doctest
.
DocTestSuite
(
"ZODB.serialize"
))
return
suite
src/ZODB/tests/testUtils.py
View file @
539a20f6
...
...
@@ -13,10 +13,10 @@
##############################################################################
"""Test the routines to convert between long and 64-bit strings"""
from
persistent
import
Persistent
import
doctest
import
random
import
unittest
from
persistent
import
Persistent
from
zope.testing
import
doctest
NUM
=
100
...
...
src/ZODB/tests/test_cache.py
View file @
539a20f6
...
...
@@ -12,12 +12,10 @@
#
##############################################################################
"""Test behavior of Connection plus cPickleCache."""
from
zope.testing
import
doctest
from
persistent
import
Persistent
import
transaction
from
ZODB.config
import
databaseFromString
import
doctest
import
transaction
class
RecalcitrantObject
(
Persistent
):
"""A Persistent object that will not become a ghost."""
...
...
src/ZODB/tests/test_datamanageradapter.py
View file @
539a20f6
...
...
@@ -11,11 +11,8 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""
$Id$
"""
import
unittest
from
zope.testing.
doctest
import
DocTestSuite
from
doctest
import
DocTestSuite
from
transaction._transaction
import
DataManagerAdapter
from
ZODB.tests.sampledm
import
DataManager
...
...
src/ZODB/tests/test_doctest_files.py
View file @
539a20f6
...
...
@@ -11,13 +11,12 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
import
doctest
import
unittest
from
zope.testing
import
doctest
__test__
=
dict
(
cross_db_refs_to_blank_db_name
=
"""
There was a bug that caused bad refs to be generated is a database
name was blank.
...
...
@@ -38,7 +37,7 @@ __test__ = dict(
>>> list(conn2.root()[0].keys())
[]
"""
,
)
...
...
src/ZODB/tests/test_fsdump.py
View file @
539a20f6
...
...
@@ -67,7 +67,7 @@ Clean up.
>>> st.close()
"""
from
zope.testing
import
doctest
import
doctest
import
zope.testing.setupstack
def
test_suite
():
...
...
src/ZODB/tests/testcrossdatabasereferences.py
View file @
539a20f6
...
...
@@ -11,12 +11,9 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""
$Id$
"""
import
unittest
from
zope.testing
import
doctest
import
doctest
import
persistent
import
unittest
class
MyClass
(
persistent
.
Persistent
):
pass
...
...
src/ZODB/tests/testfsoids.py
View file @
539a20f6
...
...
@@ -11,7 +11,6 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
r"""
fsoids test, of the workhorse fsoids.Trace class
================================================
...
...
@@ -168,7 +167,7 @@ Clean up.
>>> st.cleanup() # remove .fs, .index, etc
"""
from
zope.testing
import
doctest
import
doctest
def
test_suite
():
return
doctest
.
DocTestSuite
()
src/ZODB/tests/testmvcc.py
View file @
539a20f6
...
...
@@ -402,7 +402,7 @@ True
1
"""
from
zope.testing
import
doctest
import
doctest
def
test_suite
():
return
doctest
.
DocTestSuite
()
src/ZODB/tests/testpersistentclass.py
View file @
539a20f6
...
...
@@ -11,17 +11,13 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""ZClass tests
$Id$
"""
import
os
,
sys
import
unittest
import
ZODB.tests.util
import
doctest
import
os
import
sys
import
transaction
from
zope.testing
import
doc
test
import
unit
test
import
ZODB.persistentclass
import
ZODB.tests.util
def
class_with_circular_ref_to_self
():
"""
...
...
@@ -41,7 +37,7 @@ It should be possible for a class to reger to itself.
>>> c = C2()
>>> c.__class__.__name__
'C'
"""
# XXX need to update files to get newer testing package
...
...
src/persistent/tests/test_PickleCache.py
View file @
539a20f6
...
...
@@ -11,10 +11,6 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""Unit tests for PickleCache
$Id$
"""
class
DummyConnection
:
...
...
@@ -114,7 +110,7 @@ Peristent meta classes work too:
"""
from
zope.testing.
doctest
import
DocTestSuite
from
doctest
import
DocTestSuite
import
unittest
def
test_suite
():
...
...
src/persistent/tests/test_mapping.py
View file @
539a20f6
...
...
@@ -11,8 +11,9 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
import
doctest
import
unittest
from
zope.testing
import
doctest
,
setupstack
from
zope.testing
import
setupstack
def
test_suite
():
return
unittest
.
TestSuite
((
...
...
src/persistent/tests/test_overriding_attrs.py
View file @
539a20f6
...
...
@@ -15,8 +15,6 @@
This module tests and documents, through example, overriding attribute
access methods.
$Id$
"""
from
persistent
import
Persistent
# ouch!
...
...
@@ -379,5 +377,5 @@ class SampleOverridingGetattributeSetattrAndDelattr(Persistent):
def
test_suite
():
from
zope.testing.
doctest
import
DocTestSuite
from
doctest
import
DocTestSuite
return
DocTestSuite
()
src/persistent/tests/test_persistent.py
View file @
539a20f6
...
...
@@ -11,9 +11,9 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
import
unittest
from
zope.testing
import
doctest
from
persistent
import
Persistent
,
simple_new
import
doctest
import
unittest
class
P
(
Persistent
):
def
__init__
(
self
):
...
...
src/persistent/tests/test_pickle.py
View file @
539a20f6
...
...
@@ -11,11 +11,6 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""Basic pickling tests
$Id$
"""
from
persistent
import
Persistent
import
pickle
...
...
@@ -269,7 +264,7 @@ def test_pickling_w_slots_w_empty_dict():
"""
from
zope.testing.
doctest
import
DocTestSuite
from
doctest
import
DocTestSuite
import
unittest
def
test_suite
():
...
...
src/persistent/tests/test_wref.py
View file @
539a20f6
...
...
@@ -11,11 +11,8 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""
$Id$
"""
import
unittest
from
zope.testing.
doctest
import
DocTestSuite
from
doctest
import
DocTestSuite
def
test_suite
():
return
DocTestSuite
(
'persistent.wref'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment