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
nexedi
ZODB
Commits
9af7c7f3
Commit
9af7c7f3
authored
Mar 05, 2020
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix test compatibility with persistent 4.6; test CPython with PURE_PYTHON.
parent
b5895a5c
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
10 deletions
+25
-10
.travis.yml
.travis.yml
+8
-0
src/ZODB/tests/testCache.py
src/ZODB/tests/testCache.py
+7
-0
src/ZODB/tests/testConnectionSavepoint.py
src/ZODB/tests/testConnectionSavepoint.py
+2
-8
src/ZODB/tests/testThreadedShutdown.py
src/ZODB/tests/testThreadedShutdown.py
+1
-1
tox.ini
tox.ini
+7
-1
No files found.
.travis.yml
View file @
9af7c7f3
language
:
python
python
:
-
2.7
-
3.5
...
...
@@ -8,6 +9,13 @@ python:
-
pypy
-
pypy3
jobs
:
include
:
# Special Linux builds
-
name
:
"
Python:
3.8,
pure
(no
C
extensions)"
python
:
3.8
env
:
PURE_PYTHON=1
install
:
-
pip install -U pip
-
pip install -U setuptools zc.buildout
...
...
src/ZODB/tests/testCache.py
View file @
9af7c7f3
...
...
@@ -383,6 +383,13 @@ class CacheErrors(unittest.TestCase):
# to None actually go *down* by a few. Possibly it has to
# do with the lazy tracking of frames?
# (https://github.com/python/cpython/commit/5a625d0aa6a6d9ec6574ee8344b41d63dcb9897e)
#
# Likewise, on 3.8 with PURE_PYTHON it sometimes increases
# by 1; this is cleared up by a garbage collection (it's
# not clear where/why)
new_nones
=
rc
(
None
)
if
new_nones
>
nones
:
gc
.
collect
()
self
.
assertLessEqual
(
rc
(
None
),
nones
)
def
testTwoCaches
(
self
):
...
...
src/ZODB/tests/testConnectionSavepoint.py
View file @
9af7c7f3
...
...
@@ -127,17 +127,11 @@ then, + 1 for the root object:
True
Making a savepoint at this time used to leave the cache holding the same
number of objects. Make sure the cache shrinks now instead.
number of objects. Make sure the cache shrinks now instead. (Implementations that use
weak references, such as PyPy, may need a garbage collection.)
>>> dummy = transaction.savepoint()
Jython needs a GC, and needs to actually access the cache data to be
sure the size is updated (it uses "eventually consistent" implementations for
its weak dictionaries):
>>> _ = gc.collect()
>>> _ = getattr(cn._cache, 'data', {}).values()
>>> _ = getattr(cn._cache, 'data', {}).keys()
>>> len(cn._cache) <= CACHESIZE + 1
True
...
...
src/ZODB/tests/testThreadedShutdown.py
View file @
9af7c7f3
...
...
@@ -7,7 +7,7 @@ import ZODB
class
ZODBClientThread
(
threading
.
Thread
):
sleep_time
=
15
sleep_time
=
3
def
__init__
(
self
,
db
,
test
):
threading
.
Thread
.
__init__
(
self
)
...
...
tox.ini
View file @
9af7c7f3
[tox]
envlist
=
py27,py35,py36,py37,py38,pypy,pypy3
envlist
=
py27,py35,py36,py37,py38,pypy,pypy3
,py38-pure
[testenv]
# ZODB.tests.testdocumentation needs to find
...
...
@@ -22,3 +22,9 @@ commands =
deps
=
{
[testenv]
deps}
coverage
[testenv:py38-pure]
basepython
=
python3.8
setenv
=
PURE_PYTHON
=
1
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