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
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
Nicolas Wavrant
ZODB
Commits
865f697b
Commit
865f697b
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
c41bc70d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
2 deletions
+31
-2
src/ZEO/tests/testStart.py
src/ZEO/tests/testStart.py
+15
-1
src/ZEO/tests/testZEO.py
src/ZEO/tests/testZEO.py
+16
-1
No files found.
src/ZEO/tests/testStart.py
View file @
865f697b
...
...
@@ -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
):
...
...
src/ZEO/tests/testZEO.py
View file @
865f697b
...
...
@@ -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