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
86038e88
Commit
86038e88
authored
Mar 10, 2011
by
willmcgugan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Potential fix for Py2.7 issue with tests
parent
bd0a4e5c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
fs/tests/__init__.py
+2
-1
fs/tests/test_ftpfs.py
+5
-6
No files found.
fs/tests/__init__.py
View file @
86038e88
...
@@ -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
)
...
...
fs/tests/test_ftpfs.py
View file @
86038e88
...
@@ -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
()
...
...
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