summaryrefslogtreecommitdiff
path: root/test/test_importhook.py
diff options
context:
space:
mode:
authorMarcel Hellkamp <marc@gsites.de>2011-07-19 21:22:35 +0200
committerMarcel Hellkamp <marc@gsites.de>2011-07-19 21:31:45 +0200
commitd832e7d8da59d46702a4be42597f6cfa152c36ce (patch)
tree6f134a7c1f4def0c24430c73ea5a438cfa69047c /test/test_importhook.py
parent0fc3cea31b3d03c12a19895797feb700e05e3423 (diff)
downloadbottle-d832e7d8da59d46702a4be42597f6cfa152c36ce.tar.gz
fix: GAE dev server crash on windows. (fix #183)
Thanks apexi200sx and Marcos Neves
Diffstat (limited to 'test/test_importhook.py')
-rw-r--r--test/test_importhook.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/test_importhook.py b/test/test_importhook.py
index 827307e..bbb3866 100644
--- a/test/test_importhook.py
+++ b/test/test_importhook.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
import unittest
-import sys
+import sys, os
import imp
class TestImportHooks(unittest.TestCase):
@@ -33,5 +33,12 @@ class TestImportHooks(unittest.TestCase):
import bottle.ext.doesnotexist
self.assertRaises(ImportError, test)
+ def test_ext_isfile(self):
+ ''' The virtual module needs a valid __file__ attribute.
+ If not, the Google app engine development server crashes on windows.
+ '''
+ from bottle import ext
+ self.assertTrue(os.path.isfile(ext.__file__))
+
if __name__ == '__main__': #pragma: no cover
unittest.main()