Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
BTrees
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
BTrees
Commits
753416e8
Commit
753416e8
authored
Nov 13, 2012
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test pure-Python IO entities everywhere.
parent
4fd37b0d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
186 additions
and
4 deletions
+186
-4
BTrees/check.py
BTrees/check.py
+1
-0
BTrees/tests/test_IOBTree.py
BTrees/tests/test_IOBTree.py
+185
-4
No files found.
BTrees/check.py
View file @
753416e8
...
...
@@ -37,6 +37,7 @@ from BTrees.IFBTree import IFBTreePy, IFBucketPy, IFSetPy, IFTreeSetPy
from
BTrees.IIBTree
import
IIBTree
,
IIBucket
,
IISet
,
IITreeSet
from
BTrees.IIBTree
import
IIBTreePy
,
IIBucketPy
,
IISetPy
,
IITreeSetPy
from
BTrees.IOBTree
import
IOBTree
,
IOBucket
,
IOSet
,
IOTreeSet
from
BTrees.IOBTree
import
IOBTreePy
,
IOBucketPy
,
IOSetPy
,
IOTreeSetPy
from
BTrees.LFBTree
import
LFBTree
,
LFBucket
,
LFSet
,
LFTreeSet
from
BTrees.LLBTree
import
LLBTree
,
LLBucket
,
LLSet
,
LLTreeSet
from
BTrees.LOBTree
import
LOBTree
,
LOBucket
,
LOSet
,
LOTreeSet
...
...
BTrees/tests/test_IOBTree.py
View file @
753416e8
...
...
@@ -38,6 +38,13 @@ class IOBTreeInternalKeyTest(InternalKeysMappingTest, unittest.TestCase):
return
IOBTree
class
IOBTreePyInternalKeyTest
(
InternalKeysMappingTest
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
from
BTrees.IOBTree
import
IOBTreePy
return
IOBTreePy
class
IOTreeSetInternalKeyTest
(
InternalKeysSetTest
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
...
...
@@ -45,6 +52,13 @@ class IOTreeSetInternalKeyTest(InternalKeysSetTest, unittest.TestCase):
return
IOTreeSet
class
IOTreeSetPyInternalKeyTest
(
InternalKeysSetTest
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
from
BTrees.IOBTree
import
IOTreeSetPy
return
IOTreeSetPy
class
IOBucketTest
(
MappingBase
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
...
...
@@ -52,6 +66,13 @@ class IOBucketTest(MappingBase, unittest.TestCase):
return
IOBucket
class
IOBucketPyTest
(
MappingBase
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
from
BTrees.IOBTree
import
IOBucketPy
return
IOBucketPy
class
IOTreeSetTest
(
NormalSetTests
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
...
...
@@ -59,6 +80,13 @@ class IOTreeSetTest(NormalSetTests, unittest.TestCase):
return
IOTreeSet
class
IOTreeSetPyTest
(
NormalSetTests
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
from
BTrees.IOBTree
import
IOTreeSetPy
return
IOTreeSetPy
class
IOSetTest
(
ExtendedSetTests
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
...
...
@@ -66,25 +94,45 @@ class IOSetTest(ExtendedSetTests, unittest.TestCase):
return
IOSet
class
IOSetPyTest
(
ExtendedSetTests
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
from
BTrees.IOBTree
import
IOSetPy
return
IOSetPy
class
IOBTreeTest
(
BTreeTests
,
unittest
.
TestCase
):
def
_makeOne
(
self
):
from
BTrees.IOBTree
import
IOBTree
return
IOBTree
()
class
IOBTreePyTest
(
BTreeTests
,
unittest
.
TestCase
):
def
_makeOne
(
self
):
from
BTrees.IOBTree
import
IOBTreePy
return
IOBTreePy
()
if
using64bits
:
class
IOBTreeTest
(
BTreeTests
,
TestLongIntKeys
,
unittest
.
TestCase
):
def
_makeOne
(
self
):
from
BTrees.IOBTree
import
IOBTree
return
IOBTree
()
class
TestIOBTrees
(
TypeTest
,
unittest
.
TestCase
):
class
IOBTreePyTest
(
BTreeTests
,
TestLongIntKeys
,
unittest
.
TestCase
):
def
_makeOne
(
self
):
from
BTrees.IOBTree
import
IOBTree
return
IOBTree
()
def
_makeOne
(
self
):
from
BTrees.IOBTree
import
IOBTreePy
return
IOBTreePy
()
class
_TestIOBTreesBase
(
TypeTest
):
def
_stringraises
(
self
):
self
.
_makeOne
()[
'c'
]
=
1
...
...
@@ -96,6 +144,20 @@ class TestIOBTrees(TypeTest, unittest.TestCase):
self
.
_makeOne
()[
None
]
=
1
class
TestIOBTrees
(
_TestIOBTreesBase
,
unittest
.
TestCase
):
def
_makeOne
(
self
):
from
BTrees.IOBTree
import
IOBTree
return
IOBTree
()
class
TestIOBTreesPy
(
_TestIOBTreesBase
,
unittest
.
TestCase
):
def
_makeOne
(
self
):
from
BTrees.IOBTree
import
IOBTreePy
return
IOBTreePy
()
class
TestIOSets
(
I_SetsBase
,
unittest
.
TestCase
):
def
_makeOne
(
self
):
...
...
@@ -103,22 +165,41 @@ class TestIOSets(I_SetsBase, unittest.TestCase):
return
IOSet
()
class
TestIOSetsPy
(
I_SetsBase
,
unittest
.
TestCase
):
def
_makeOne
(
self
):
from
BTrees.IOBTree
import
IOSetPy
return
IOSetPy
()
class
TestIOTreeSets
(
I_SetsBase
,
unittest
.
TestCase
):
def
_makeOne
(
self
):
from
BTrees.IOBTree
import
IOTreeSet
return
IOTreeSet
()
class
TestIOTreeSetsPy
(
I_SetsBase
,
unittest
.
TestCase
):
def
_makeOne
(
self
):
from
BTrees.IOBTree
import
IOTreeSetPy
return
IOTreeSetPy
()
class
PureIO
(
SetResult
,
unittest
.
TestCase
):
def
union
(
self
,
*
args
):
from
BTrees.IOBTree
import
union
return
union
(
*
args
)
def
intersection
(
self
,
*
args
):
from
BTrees.IOBTree
import
intersection
return
intersection
(
*
args
)
def
difference
(
self
,
*
args
):
from
BTrees.IOBTree
import
difference
return
difference
(
*
args
)
def
builders
(
self
):
from
BTrees.IOBTree
import
IOBTree
from
BTrees.IOBTree
import
IOBucket
...
...
@@ -126,27 +207,84 @@ class PureIO(SetResult, unittest.TestCase):
from
BTrees.IOBTree
import
IOSet
return
IOSet
,
IOTreeSet
,
makeBuilder
(
IOBTree
),
makeBuilder
(
IOBucket
)
class
PureIOPy
(
SetResult
,
unittest
.
TestCase
):
def
union
(
self
,
*
args
):
from
BTrees.IOBTree
import
unionPy
return
unionPy
(
*
args
)
def
intersection
(
self
,
*
args
):
from
BTrees.IOBTree
import
intersectionPy
return
intersectionPy
(
*
args
)
def
difference
(
self
,
*
args
):
from
BTrees.IOBTree
import
differencePy
return
differencePy
(
*
args
)
def
builders
(
self
):
from
BTrees.IOBTree
import
IOBTreePy
from
BTrees.IOBTree
import
IOBucketPy
from
BTrees.IOBTree
import
IOTreeSetPy
from
BTrees.IOBTree
import
IOSetPy
return
(
IOSetPy
,
IOTreeSetPy
,
makeBuilder
(
IOBTreePy
),
makeBuilder
(
IOBucketPy
))
class
TestIOMultiUnion
(
MultiUnion
,
unittest
.
TestCase
):
def
multiunion
(
self
,
*
args
):
from
BTrees.IOBTree
import
multiunion
return
multiunion
(
*
args
)
def
union
(
self
,
*
args
):
from
BTrees.IOBTree
import
union
return
union
(
*
args
)
def
mkset
(
self
,
*
args
):
from
BTrees.IOBTree
import
IOSet
as
mkset
return
mkset
(
*
args
)
def
mktreeset
(
self
,
*
args
):
from
BTrees.IOBTree
import
IOTreeSet
as
mktreeset
return
mktreeset
(
*
args
)
def
mkbucket
(
self
,
*
args
):
from
BTrees.IOBTree
import
IOBucket
as
mkbucket
return
mkbucket
(
*
args
)
def
mkbtree
(
self
,
*
args
):
from
BTrees.IOBTree
import
IOBTree
as
mkbtree
return
mkbtree
(
*
args
)
class
TestIOMultiUnionPy
(
MultiUnion
,
unittest
.
TestCase
):
def
multiunion
(
self
,
*
args
):
from
BTrees.IOBTree
import
multiunionPy
return
multiunionPy
(
*
args
)
def
union
(
self
,
*
args
):
from
BTrees.IOBTree
import
unionPy
return
unionPy
(
*
args
)
def
mkset
(
self
,
*
args
):
from
BTrees.IOBTree
import
IOSetPy
as
mkset
return
mkset
(
*
args
)
def
mktreeset
(
self
,
*
args
):
from
BTrees.IOBTree
import
IOTreeSetPy
as
mktreeset
return
mktreeset
(
*
args
)
def
mkbucket
(
self
,
*
args
):
from
BTrees.IOBTree
import
IOBucketPy
as
mkbucket
return
mkbucket
(
*
args
)
def
mkbtree
(
self
,
*
args
):
from
BTrees.IOBTree
import
IOBTreePy
as
mkbtree
return
mkbtree
(
*
args
)
class
IOBTreeConflictTests
(
MappingConflictTestBase
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
...
...
@@ -154,6 +292,13 @@ class IOBTreeConflictTests(MappingConflictTestBase, unittest.TestCase):
return
IOBTree
class
IOBTreeConflictTestsPy
(
MappingConflictTestBase
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
from
BTrees.IOBTree
import
IOBTreePy
return
IOBTreePy
class
IOBucketConflictTests
(
MappingConflictTestBase
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
...
...
@@ -161,6 +306,13 @@ class IOBucketConflictTests(MappingConflictTestBase, unittest.TestCase):
return
IOBucket
class
IOBucketConflictTestsPy
(
MappingConflictTestBase
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
from
BTrees.IOBTree
import
IOBucketPy
return
IOBucketPy
class
IOTreeSetConflictTests
(
SetConflictTestBase
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
...
...
@@ -168,6 +320,13 @@ class IOTreeSetConflictTests(SetConflictTestBase, unittest.TestCase):
return
IOTreeSet
class
IOTreeSetConflictTestsPy
(
SetConflictTestBase
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
from
BTrees.IOBTree
import
IOTreeSetPy
return
IOTreeSetPy
class
IOSetConflictTests
(
SetConflictTestBase
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
...
...
@@ -175,6 +334,13 @@ class IOSetConflictTests(SetConflictTestBase, unittest.TestCase):
return
IOSet
class
IOSetConflictTestsPy
(
SetConflictTestBase
,
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
from
BTrees.IOBTree
import
IOSetPy
return
IOSetPy
class
IOModuleTest
(
ModuleTest
,
unittest
.
TestCase
):
prefix
=
'IO'
...
...
@@ -207,19 +373,34 @@ class IOModuleTest(ModuleTest, unittest.TestCase):
def
test_suite
():
return
unittest
.
TestSuite
((
unittest
.
makeSuite
(
IOBTreeInternalKeyTest
),
unittest
.
makeSuite
(
IOBTreePyInternalKeyTest
),
unittest
.
makeSuite
(
IOTreeSetInternalKeyTest
),
unittest
.
makeSuite
(
IOTreeSetPyInternalKeyTest
),
unittest
.
makeSuite
(
IOBucketTest
),
unittest
.
makeSuite
(
IOBucketPyTest
),
unittest
.
makeSuite
(
IOTreeSetTest
),
unittest
.
makeSuite
(
IOTreeSetPyTest
),
unittest
.
makeSuite
(
IOSetTest
),
unittest
.
makeSuite
(
IOSetPyTest
),
unittest
.
makeSuite
(
IOBTreeTest
),
unittest
.
makeSuite
(
IOBTreePyTest
),
unittest
.
makeSuite
(
TestIOBTrees
),
unittest
.
makeSuite
(
TestIOBTreesPy
),
unittest
.
makeSuite
(
TestIOSets
),
unittest
.
makeSuite
(
TestIOSetsPy
),
unittest
.
makeSuite
(
TestIOTreeSets
),
unittest
.
makeSuite
(
TestIOTreeSetsPy
),
unittest
.
makeSuite
(
TestIOMultiUnion
),
unittest
.
makeSuite
(
TestIOMultiUnionPy
),
unittest
.
makeSuite
(
PureIO
),
unittest
.
makeSuite
(
PureIOPy
),
unittest
.
makeSuite
(
IOBTreeConflictTests
),
unittest
.
makeSuite
(
IOBTreeConflictTestsPy
),
unittest
.
makeSuite
(
IOBucketConflictTests
),
unittest
.
makeSuite
(
IOBucketConflictTestsPy
),
unittest
.
makeSuite
(
IOTreeSetConflictTests
),
unittest
.
makeSuite
(
IOTreeSetConflictTestsPy
),
unittest
.
makeSuite
(
IOSetConflictTests
),
unittest
.
makeSuite
(
IOSetConflictTestsPy
),
unittest
.
makeSuite
(
IOModuleTest
),
))
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