Commit 924df19c by rfkelly0

include thread-safety tests in tests/test_expose.py

parent 1cef6281
...@@ -535,6 +535,8 @@ class ThreadingTestCases: ...@@ -535,6 +535,8 @@ class ThreadingTestCases:
for meth in dir(this): for meth in dir(this):
if not meth.startswith("test_"): if not meth.startswith("test_"):
continue continue
if meth == "test_pickling":
continue
if self.fs.exists(subdir): if self.fs.exists(subdir):
self.fs.removedir(subdir,force=True) self.fs.removedir(subdir,force=True)
self.fs.makedir(subdir) self.fs.makedir(subdir)
...@@ -591,7 +593,6 @@ class ThreadingTestCases: ...@@ -591,7 +593,6 @@ class ThreadingTestCases:
else: else:
self.assertEquals(len(errors),0) self.assertEquals(len(errors),0)
def test_concurrent_copydir(self): def test_concurrent_copydir(self):
self.fs.makedir("a") self.fs.makedir("a")
self.fs.makedir("a/b") self.fs.makedir("a/b")
......
...@@ -11,14 +11,14 @@ import socket ...@@ -11,14 +11,14 @@ import socket
import threading import threading
import time import time
from fs.tests import FSTestCases from fs.tests import FSTestCases, ThreadingTestCases
from fs.tempfs import TempFS from fs.tempfs import TempFS
from fs.osfs import OSFS from fs.osfs import OSFS
from fs.path import * from fs.path import *
from fs import rpcfs from fs import rpcfs
from fs.expose.xmlrpc import RPCFSServer from fs.expose.xmlrpc import RPCFSServer
class TestRPCFS(unittest.TestCase,FSTestCases): class TestRPCFS(unittest.TestCase,FSTestCases,ThreadingTestCases):
def makeServer(self,fs,addr): def makeServer(self,fs,addr):
return RPCFSServer(fs,addr,logRequests=False) return RPCFSServer(fs,addr,logRequests=False)
...@@ -99,7 +99,7 @@ class TestSFTPFS(TestRPCFS): ...@@ -99,7 +99,7 @@ class TestSFTPFS(TestRPCFS):
from fs.expose import fuse from fs.expose import fuse
from fs.osfs import OSFS from fs.osfs import OSFS
class TestFUSE(unittest.TestCase,FSTestCases): class TestFUSE(unittest.TestCase,FSTestCases,ThreadingTestCases):
def setUp(self): def setUp(self):
self.temp_fs = TempFS() self.temp_fs = TempFS()
......
...@@ -76,7 +76,7 @@ class TestMountFS(unittest.TestCase,FSTestCases,ThreadingTestCases): ...@@ -76,7 +76,7 @@ class TestMountFS(unittest.TestCase,FSTestCases,ThreadingTestCases):
from fs import tempfs from fs import tempfs
class TestTempFS(unittest.TestCase,FSTestCases): class TestTempFS(unittest.TestCase,FSTestCases,ThreadingTestCases):
def setUp(self): def setUp(self):
self.fs = tempfs.TempFS() self.fs = tempfs.TempFS()
...@@ -90,4 +90,3 @@ class TestTempFS(unittest.TestCase,FSTestCases): ...@@ -90,4 +90,3 @@ class TestTempFS(unittest.TestCase,FSTestCases):
td = self.fs._temp_dir td = self.fs._temp_dir
return os.path.exists(os.path.join(td, relpath(p))) return os.path.exists(os.path.join(td, relpath(p)))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment