Added testcase for an issue that may exist on windows

This commit is contained in:
Armin Ronacher 2010-12-23 14:23:33 +01:00
parent 179da5895f
commit 16bf25ffaa

View file

@ -817,6 +817,21 @@ class ModuleTestCase(unittest.TestCase):
else:
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):