Permalink
Browse files

remove dead code

  • Loading branch information...
1 parent 643a834 commit 1c7724e5484c65257f18b542662d5e1a1115c9f0 @mcdonc mcdonc committed Sep 19, 2012
Showing with 6 additions and 15 deletions.
  1. +0 −5 pyramid/chameleon_text.py
  2. +0 −5 pyramid/chameleon_zpt.py
  3. +6 −5 pyramid/tests/test_config/test_init.py
@@ -1,5 +1,3 @@
-import sys
-
from zope.interface import implementer
from chameleon.zpt.template import PageTextTemplateFile
@@ -22,9 +20,6 @@ def __init__(self, path, lookup, macro=None):
@reify # avoid looking up reload_templates before manager pushed
def template(self):
- if sys.platform.startswith('java'): # pragma: no cover
- raise RuntimeError(
- 'Chameleon templates are not compatible with Jython')
return PageTextTemplateFile(self.path,
auto_reload=self.lookup.auto_reload,
debug=self.lookup.debug,
View
@@ -1,5 +1,3 @@
-import sys
-
from zope.interface import implementer
from chameleon.zpt.template import PageTemplateFile
@@ -20,9 +18,6 @@ def __init__(self, path, lookup, macro=None):
@reify # avoid looking up reload_templates before manager pushed
def template(self):
- if sys.platform.startswith('java'): # pragma: no cover
- raise RuntimeError(
- 'Chameleon templates are not compatible with Jython')
tf = PageTemplateFile(self.path,
auto_reload=self.lookup.auto_reload,
debug=self.lookup.debug,
@@ -923,12 +923,13 @@ def test_scan_integration(self):
result = render_view_to_response(ctx, req, 'another_stacked_class2')
self.assertEqual(result, 'another_stacked_class')
- if not os.name.startswith('java'):
- # on Jython, a class without an __init__ apparently accepts
- # any number of arguments without raising a TypeError.
+ # NB: on Jython, a class without an __init__ apparently accepts
+ # any number of arguments without raising a TypeError, so the next
+ # assertion may fail there. We don't support Jython at the moment,
+ # this is just a note to a future self.
- self.assertRaises(TypeError,
- render_view_to_response, ctx, req, 'basemethod')
+ self.assertRaises(TypeError,
+ render_view_to_response, ctx, req, 'basemethod')
result = render_view_to_response(ctx, req, 'method1')
self.assertEqual(result, 'method1')

0 comments on commit 1c7724e

Please sign in to comment.