Permalink
Browse files

make pass predictably on jython

  • Loading branch information...
1 parent ed49204 commit 89335fd705ac7e179c243c1758294c605600a781 @mcdonc mcdonc committed Jan 30, 2011
Showing with 8 additions and 9 deletions.
  1. +5 −5 pyramid/tests/test_config.py
  2. +3 −4 pyramid/tests/test_router.py
@@ -2923,11 +2923,11 @@ def scanconflicts(e):
for conflict in conflicts:
for confinst in conflict:
yield confinst[3]
- c1, c2, c3, c4 = scanconflicts(why)
- self.assertEqual(c1, "@view_config(renderer='string')")
- self.assertEqual(c2, "@view_config(renderer='string')")
- self.assertEqual(c3, "@view_config(name='two', renderer='string')")
- self.assertEqual(c4, "@view_config(name='two', renderer='string')")
+ which = list(scanconflicts(why))
+ self.assertEqual(len(which), 4)
+ self.failUnless("@view_config(renderer='string')" in which)
+ self.failUnless("@view_config(name='two', renderer='string')" in
+ which)
def _conflictFunctions(self, e):
conflicts = e._conflicts.values()
@@ -528,14 +528,13 @@ def factory(request):
self.assertEqual(request.matched_route.name, 'foo')
self.assertEqual(len(logger.messages), 1)
- self.assertEqual(logger.messages[0],
+ self.failUnless(
+ logger.messages[0].startswith(
"route matched for url http://localhost:8080"
"/archives/action1/article1; "
"route_name: 'foo', "
"path_info: '/archives/action1/article1', "
- "pattern: 'archives/:action/:article', "
- "matchdict: {'action': u'action1', 'article': u'article1'}, "
- "predicates: ()")
+ "pattern: 'archives/:action/:article', "))
def test_call_route_match_miss_debug_routematch(self):
from pyramid.exceptions import NotFound

0 comments on commit 89335fd

Please sign in to comment.