Commit 924df19c by rfkelly0

include thread-safety tests in tests/test_expose.py

parent 1cef6281
......@@ -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")
......
......@@ -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()
......
......@@ -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)))
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