Commit 86038e88 by willmcgugan

Potential fix for Py2.7 issue with tests

parent bd0a4e5c
...@@ -826,7 +826,7 @@ class FSTestCases(object): ...@@ -826,7 +826,7 @@ class FSTestCases(object):
self.assertTrue(cmp_datetimes(d2, info['modified_time'])) self.assertTrue(cmp_datetimes(d2, info['modified_time']))
class ThreadingTestCases: class ThreadingTestCases(object):
"""Testcases for thread-safety of FS implementations.""" """Testcases for thread-safety of FS implementations."""
# These are either too slow to be worth repeating, # These are either too slow to be worth repeating,
...@@ -939,6 +939,7 @@ class ThreadingTestCases: ...@@ -939,6 +939,7 @@ class ThreadingTestCases:
self.fs.makedir(subdir) self.fs.makedir(subdir)
self._yield() self._yield()
getattr(this,meth)() getattr(this,meth)()
super(this.__class__, this)
@property @property
def fs(this): def fs(this):
return self.fs.opendir(this.subdir) return self.fs.opendir(this.subdir)
......
...@@ -66,12 +66,11 @@ class TestFTPFS(unittest.TestCase, FSTestCases, ThreadingTestCases): ...@@ -66,12 +66,11 @@ class TestFTPFS(unittest.TestCase, FSTestCases, ThreadingTestCases):
def tearDown(self): def tearDown(self):
self.ftp_server.terminate() #self.ftp_server.terminate()
#if sys.platform == 'win32': if sys.platform == 'win32':
# import win32api os.popen('TASKKILL /PID '+str(self.ftp_server.pid)+' /F')
# os.popen('TASKKILL /PID '+str(self.ftp_server.pid)+' /F') else:
#else: os.system('kill '+str(self.ftp_server.pid))
# os.system('kill '+str(self.ftp_server.pid))
shutil.rmtree(self.temp_dir) shutil.rmtree(self.temp_dir)
self.fs.close() self.fs.close()
......
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