summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2018-05-28 14:30:38 -0400
committerJason R. Coombs <jaraco@jaraco.com>2018-05-28 14:30:38 -0400
commit04312795ddc93b5e005d6c1615ff801534ba7457 (patch)
treed9934309734524a6227f9d1c86c9d2ce1833b69b
parent4ce85477f4d2a049c3d702b0a37a7d22cbfa4d5d (diff)
downloadcherrypy-git-04312795ddc93b5e005d6c1615ff801534ba7457.tar.gz
Add test capturing failure. Ref #1697.
-rw-r--r--cherrypy/test/test_plugins.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/cherrypy/test/test_plugins.py b/cherrypy/test/test_plugins.py
new file mode 100644
index 00000000..4d3aa6b1
--- /dev/null
+++ b/cherrypy/test/test_plugins.py
@@ -0,0 +1,14 @@
+from cherrypy.process import plugins
+
+
+__metaclass__ = type
+
+
+class TestAutoreloader:
+ def test_file_for_file_module_when_None(self):
+ """No error when module.__file__ is None.
+ """
+ class test_module:
+ __file__ = None
+
+ assert plugins.Autoreloader._file_for_file_module(test_module) is None