From 85ee02b24caf0bf6b491b5ecf7ad84c29ca8c75c Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 18 Nov 2010 04:21:22 -0500 Subject: - Make test suite pass on Jython (requires PasteScript trunk, presumably to be 1.7.4). --- CHANGES.txt | 3 +++ pyramid/tests/test_configuration.py | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 604f28cf4..14b2c569d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -12,6 +12,9 @@ Features - Add a ``pyramid.request.Request.route_path`` API. This is a convenience method of the request which calls ``pyramid.url.route_url``. +- Make test suite pass on Jython (requires PasteScript trunk, presumably to + be 1.7.4). + Bug Fixes --------- diff --git a/pyramid/tests/test_configuration.py b/pyramid/tests/test_configuration.py index ded17cb33..0d8905f7c 100644 --- a/pyramid/tests/test_configuration.py +++ b/pyramid/tests/test_configuration.py @@ -2940,6 +2940,7 @@ class ConfiguratorTests(unittest.TestCase): pyramid.tests) def test_scan_integration(self): + import os from zope.interface import alsoProvides from pyramid.interfaces import IRequest from pyramid.view import render_view_to_response @@ -3011,8 +3012,12 @@ class ConfiguratorTests(unittest.TestCase): result = render_view_to_response(ctx, req, 'another_stacked_class2') self.assertEqual(result, 'another_stacked_class') - self.assertRaises(TypeError, - render_view_to_response, ctx, req, 'basemethod') + if not os.name.startswith('java'): + # on Jython, a class without an __init__ apparently accepts + # any number of arguments without raising a TypeError. + + self.assertRaises(TypeError, + render_view_to_response, ctx, req, 'basemethod') result = render_view_to_response(ctx, req, 'method1') self.assertEqual(result, 'method1') -- cgit v1.2.3