From c070ab69f70152e6a7339af3677649e05bc94018 Mon Sep 17 00:00:00 2001 From: Dave Rawks Date: Tue, 30 Sep 2014 11:24:47 -0700 Subject: [PATCH 1/2] Resolve #9223 Fix test for python 2.6 * trivial test refactor to allow for python 2.6 compat --- test/units/TestUtils.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/test/units/TestUtils.py b/test/units/TestUtils.py index 73ef9796743..3be2668fa95 100644 --- a/test/units/TestUtils.py +++ b/test/units/TestUtils.py @@ -687,14 +687,8 @@ class TestUtils(unittest.TestCase): ) # invalid quote detection - try: - with self.assertRaises(Exception): - split_args('hey I started a quote"') - with self.assertRaises(Exception): - split_args('hey I started a\' quote') - except TypeError: - # you must be on Python 2.6 still, FIXME - pass + self.assertRaises(Exception, split_args, 'hey I started a quote"') + self.assertRaises(Exception, split_args, 'hey I started a\' quote') # jinja2 loop blocks with lots of complexity _test_combo( From 5f54b57b6d55a2e6d3d8ffe8fe5f403f8d392147 Mon Sep 17 00:00:00 2001 From: Dave Rawks Date: Tue, 30 Sep 2014 13:37:47 -0700 Subject: [PATCH 2/2] Corrected indentation --- test/units/TestUtils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/units/TestUtils.py b/test/units/TestUtils.py index 3be2668fa95..b16584199f5 100644 --- a/test/units/TestUtils.py +++ b/test/units/TestUtils.py @@ -687,8 +687,8 @@ class TestUtils(unittest.TestCase): ) # invalid quote detection - self.assertRaises(Exception, split_args, 'hey I started a quote"') - self.assertRaises(Exception, split_args, 'hey I started a\' quote') + self.assertRaises(Exception, split_args, 'hey I started a quote"') + self.assertRaises(Exception, split_args, 'hey I started a\' quote') # jinja2 loop blocks with lots of complexity _test_combo(