Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pyfs
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
pyfs
Commits
924df19c
Commit
924df19c
authored
Jun 16, 2009
by
rfkelly0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include thread-safety tests in tests/test_expose.py
parent
1cef6281
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
fs/tests/__init__.py
+2
-1
fs/tests/test_expose.py
+3
-3
fs/tests/test_fs.py
+1
-2
No files found.
fs/tests/__init__.py
View file @
924df19c
...
...
@@ -535,6 +535,8 @@ class ThreadingTestCases:
for
meth
in
dir
(
this
):
if
not
meth
.
startswith
(
"test_"
):
continue
if
meth
==
"test_pickling"
:
continue
if
self
.
fs
.
exists
(
subdir
):
self
.
fs
.
removedir
(
subdir
,
force
=
True
)
self
.
fs
.
makedir
(
subdir
)
...
...
@@ -591,7 +593,6 @@ class ThreadingTestCases:
else
:
self
.
assertEquals
(
len
(
errors
),
0
)
def
test_concurrent_copydir
(
self
):
self
.
fs
.
makedir
(
"a"
)
self
.
fs
.
makedir
(
"a/b"
)
...
...
fs/tests/test_expose.py
View file @
924df19c
...
...
@@ -11,14 +11,14 @@ import socket
import
threading
import
time
from
fs.tests
import
FSTestCases
from
fs.tests
import
FSTestCases
,
ThreadingTestCases
from
fs.tempfs
import
TempFS
from
fs.osfs
import
OSFS
from
fs.path
import
*
from
fs
import
rpcfs
from
fs.expose.xmlrpc
import
RPCFSServer
class
TestRPCFS
(
unittest
.
TestCase
,
FSTestCases
):
class
TestRPCFS
(
unittest
.
TestCase
,
FSTestCases
,
ThreadingTestCases
):
def
makeServer
(
self
,
fs
,
addr
):
return
RPCFSServer
(
fs
,
addr
,
logRequests
=
False
)
...
...
@@ -99,7 +99,7 @@ class TestSFTPFS(TestRPCFS):
from
fs.expose
import
fuse
from
fs.osfs
import
OSFS
class
TestFUSE
(
unittest
.
TestCase
,
FSTestCases
):
class
TestFUSE
(
unittest
.
TestCase
,
FSTestCases
,
ThreadingTestCases
):
def
setUp
(
self
):
self
.
temp_fs
=
TempFS
()
...
...
fs/tests/test_fs.py
View file @
924df19c
...
...
@@ -76,7 +76,7 @@ class TestMountFS(unittest.TestCase,FSTestCases,ThreadingTestCases):
from
fs
import
tempfs
class
TestTempFS
(
unittest
.
TestCase
,
FSTestCases
):
class
TestTempFS
(
unittest
.
TestCase
,
FSTestCases
,
ThreadingTestCases
):
def
setUp
(
self
):
self
.
fs
=
tempfs
.
TempFS
()
...
...
@@ -90,4 +90,3 @@ class TestTempFS(unittest.TestCase,FSTestCases):
td
=
self
.
fs
.
_temp_dir
return
os
.
path
.
exists
(
os
.
path
.
join
(
td
,
relpath
(
p
)))
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