Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
a7a6d02d
Commit
a7a6d02d
authored
Nov 16, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into t2
* master: lib/zodb: Mark test_zconn_at as xfail on plain ZODB4
parents
6c54ad01
068f97c0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
lib/tests/test_zodb.py
lib/tests/test_zodb.py
+4
-1
lib/zodb.py
lib/zodb.py
+7
-2
No files found.
lib/tests/test_zodb.py
View file @
a7a6d02d
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
#
#
# See COPYING file for full licensing terms.
# See COPYING file for full licensing terms.
# See https://www.nexedi.com/licensing for rationale and options.
# See https://www.nexedi.com/licensing for rationale and options.
from
wendelin.lib.zodb
import
LivePersistent
,
deactivate_btree
,
dbclose
,
zconn_at
,
zstor_2zurl
from
wendelin.lib.zodb
import
LivePersistent
,
deactivate_btree
,
dbclose
,
zconn_at
,
zstor_2zurl
,
zmajor
,
_zhasNXDPatch
from
wendelin.lib.testing
import
getTestDB
from
wendelin.lib.testing
import
getTestDB
from
wendelin.lib
import
testing
from
wendelin.lib
import
testing
from
persistent
import
Persistent
,
UPTODATE
,
GHOST
,
CHANGED
from
persistent
import
Persistent
,
UPTODATE
,
GHOST
,
CHANGED
...
@@ -238,6 +238,9 @@ def test_deactivate_btree():
...
@@ -238,6 +238,9 @@ def test_deactivate_btree():
# verify that zconn_at gives correct answer.
# verify that zconn_at gives correct answer.
@
func
@
func
def
test_zconn_at
():
def
test_zconn_at
():
if
zmajor
==
4
and
not
_zhasNXDPatch
(
'conn:MVCC-via-loadBefore-only'
):
pytest
.
xfail
(
reason
=
"zconn_at needs https://lab.nexedi.com/nexedi/ZODB/merge_requests/1 to work on ZODB4"
)
stor
=
testdb
.
getZODBStorage
()
stor
=
testdb
.
getZODBStorage
()
defer
(
stor
.
close
)
defer
(
stor
.
close
)
db
=
DB
(
stor
)
db
=
DB
(
stor
)
...
...
lib/zodb.py
View file @
a7a6d02d
...
@@ -182,12 +182,17 @@ def before2at(before): # -> at
...
@@ -182,12 +182,17 @@ def before2at(before): # -> at
# _zassertHasNXDPatch asserts that ZODB is patched with specified Nexedi-provided patch.
# _zassertHasNXDPatch asserts that ZODB is patched with specified Nexedi-provided patch.
def
_zassertHasNXDPatch
(
patch
,
details_link
):
def
_zassertHasNXDPatch
(
patch
,
details_link
):
nxd_patches
=
getattr
(
ZODB
,
'nxd_patches'
,
set
())
if
not
_zhasNXDPatch
(
patch
):
if
patch
not
in
nxd_patches
:
raise
AssertionError
(
raise
AssertionError
(
"ZODB%s is not patched with required Nexedi patch %r
\
n
\
t
See %s for details"
%
"ZODB%s is not patched with required Nexedi patch %r
\
n
\
t
See %s for details"
%
(
zmajor
,
patch
,
details_link
))
(
zmajor
,
patch
,
details_link
))
# _zhasNXDPatch returns whether ZODB is patched with specified Nexedi-provided patch.
def
_zhasNXDPatch
(
patch
):
nxd_patches
=
getattr
(
ZODB
,
'nxd_patches'
,
set
())
return
(
patch
in
nxd_patches
)
# _zversion returns ZODB version object
# _zversion returns ZODB version object
def
_zversion
():
def
_zversion
():
dzodb3
=
pkg_resources
.
working_set
.
find
(
pkg_resources
.
Requirement
.
parse
(
'ZODB3'
))
dzodb3
=
pkg_resources
.
working_set
.
find
(
pkg_resources
.
Requirement
.
parse
(
'ZODB3'
))
...
...
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