Added testcase for an issue that may exist on windows
This commit is contained in:
parent
b92120b190
commit
11c66be80e
1 changed files with 15 additions and 0 deletions
|
|
@ -996,6 +996,21 @@ class ModuleTestCase(unittest.TestCase):
|
||||||
else:
|
else:
|
||||||
assert 0, 'expected exception'
|
assert 0, 'expected exception'
|
||||||
|
|
||||||
|
# testcase for a security issue that may exist on windows systems
|
||||||
|
import os
|
||||||
|
import ntpath
|
||||||
|
old_path = os.path
|
||||||
|
os.path = ntpath
|
||||||
|
try:
|
||||||
|
try:
|
||||||
|
f('..\\__init__.py')
|
||||||
|
except NotFound:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
assert 0, 'expected exception'
|
||||||
|
finally:
|
||||||
|
os.path = old_path
|
||||||
|
|
||||||
|
|
||||||
class SendfileTestCase(unittest.TestCase):
|
class SendfileTestCase(unittest.TestCase):
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue