Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
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
ZEO
Commits
a6c1ffce
Commit
a6c1ffce
authored
Apr 25, 2019
by
Marius Gedminas
Committed by
GitHub
Apr 25, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #141 from zopefoundation/use-temp-dir-please
Use a temporary directory in tests
parents
bd7cd066
9266c3db
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
src/ZEO/tests/test_client_side_conflict_resolution.py
src/ZEO/tests/test_client_side_conflict_resolution.py
+8
-3
tox.ini
tox.ini
+2
-2
No files found.
src/ZEO/tests/test_client_side_conflict_resolution.py
View file @
a6c1ffce
import
os
import
shutil
import
tempfile
import
unittest
import
zope.testing.setupstack
import
zope.testing.setupstack
from
BTrees.Length
import
Length
from
ZODB
import
serialize
from
ZODB.DemoStorage
import
DemoStorage
from
ZODB.utils
import
p64
,
z64
,
maxtid
from
ZODB.utils
import
z64
,
maxtid
from
ZODB.broken
import
find_global
import
ZEO
...
...
@@ -111,7 +114,9 @@ class ClientSideConflictResolutionTests(zope.testing.setupstack.TestCase):
def
test_client_side
(
self
):
# First, traditional:
addr
,
stop
=
ZEO
.
server
(
'data.fs'
,
threaded
=
False
)
path
=
tempfile
.
mkdtemp
(
prefix
=
'zeo-test-'
)
self
.
addCleanup
(
shutil
.
rmtree
,
path
)
addr
,
stop
=
ZEO
.
server
(
os
.
path
.
join
(
path
,
'data.fs'
),
threaded
=
False
)
db
=
ZEO
.
DB
(
addr
)
with
db
.
transaction
()
as
conn
:
conn
.
root
.
l
=
Length
(
0
)
...
...
tox.ini
View file @
a6c1ffce
...
...
@@ -5,9 +5,9 @@ envlist =
[testenv]
commands
=
# Run unit tests first.
zope-testrunner
-u
--test-path
=
src --auto-color --auto-progress
zope-testrunner
-u
--test-path
=
src --auto-color --auto-progress
{posargs}
# Only run functional tests if unit tests pass.
zope-testrunner
-f
--test-path
=
src --auto-color --auto-progress
zope-testrunner
-f
--test-path
=
src --auto-color --auto-progress
{posargs}
deps
=
ZODB
>=
4.2.0b1
random2
...
...
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