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
Kirill Smelkov
ZODB
Commits
5da335ca
Commit
5da335ca
authored
Aug 14, 2002
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Define removefs() for compatibility with Zope 2.5 &c.
parent
d9cffbbb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
2 deletions
+31
-2
trunk/src/ZEO/tests/testStart.py
trunk/src/ZEO/tests/testStart.py
+15
-1
trunk/src/ZEO/tests/testZEO.py
trunk/src/ZEO/tests/testZEO.py
+16
-1
No files found.
trunk/src/ZEO/tests/testStart.py
View file @
5da335ca
...
...
@@ -22,7 +22,21 @@ import unittest
import
ZEO.start
from
ZEO.ClientStorage
import
ClientStorage
from
ZEO.util
import
Environment
from
ZODB.tests.StorageTestBase
import
removefs
try
:
from
ZODB.tests.StorageTestBase
import
removefs
except
ImportError
:
# for compatibility with Zope 2.5 &c.
def
removefs
(
base
):
"""Remove all files created by FileStorage with path base."""
for
ext
in
''
,
'.old'
,
'.tmp'
,
'.lock'
,
'.index'
,
'.pack'
:
path
=
base
+
ext
try
:
os
.
remove
(
path
)
except
os
.
error
,
err
:
if
err
[
0
]
!=
errno
.
ENOENT
:
raise
class
StartTests
(
unittest
.
TestCase
):
...
...
trunk/src/ZEO/tests/testZEO.py
View file @
5da335ca
...
...
@@ -29,9 +29,24 @@ import ZEO.ClientStorage, ZEO.StorageServer
import
ThreadedAsync
,
ZEO
.
trigger
from
ZODB.FileStorage
import
FileStorage
from
ZODB.Transaction
import
Transaction
from
ZODB.tests.StorageTestBase
import
zodb_pickle
,
MinPO
,
removefs
from
ZODB.tests.StorageTestBase
import
zodb_pickle
,
MinPO
import
zLOG
try
:
from
ZODB.tests.StorageTestBase
import
removefs
except
ImportError
:
# for compatibility with Zope 2.5 &c.
def
removefs
(
base
):
"""Remove all files created by FileStorage with path base."""
for
ext
in
''
,
'.old'
,
'.tmp'
,
'.lock'
,
'.index'
,
'.pack'
:
path
=
base
+
ext
try
:
os
.
remove
(
path
)
except
os
.
error
,
err
:
if
err
[
0
]
!=
errno
.
ENOENT
:
raise
from
ZEO.tests
import
forker
,
Cache
,
CommitLockTests
,
ThreadTests
from
ZEO.smac
import
Disconnected
...
...
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