From dfbbe87219e848ea6f02a94926140d918beb088d Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 8 Nov 2011 17:02:27 -0800 Subject: the with statement doesnt work under py26; unit tests shouldnt show comments --- pyramid/tests/test_httpexceptions.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pyramid/tests/test_httpexceptions.py b/pyramid/tests/test_httpexceptions.py index 2cbe208cd..84485fadc 100644 --- a/pyramid/tests/test_httpexceptions.py +++ b/pyramid/tests/test_httpexceptions.py @@ -295,11 +295,10 @@ class Test_HTTPMove(unittest.TestCase): return _HTTPMove(*arg, **kw) def test_it_location_none_valueerrors(self): - """ Constructing a HTTPMove instance with location=None should - throw a ValueError from __init__ so that a more-confusing - exception won't be thrown later from .prepare(environ) """ - with self.assertRaises(ValueError): - exc = self._makeOne(location=None) + # Constructing a HTTPMove instance with location=None should + # throw a ValueError from __init__ so that a more-confusing + # exception won't be thrown later from .prepare(environ) + self.assertRaises(ValueError, self._makeOne, location=None) def test_it_location_not_passed(self): exc = self._makeOne() -- cgit v1.2.3