Commit 86038e88 by willmcgugan

Potential fix for Py2.7 issue with tests

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