From ead8fdd1659f743a060679d77ec94deaa7ac92a0 Mon Sep 17 00:00:00 2001 From: Vincent Jacques Date: Tue, 8 May 2012 21:46:41 +0200 Subject: [PATCH] Use a small eval instead of a big exec --- NewIntegrationTest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NewIntegrationTest.py b/NewIntegrationTest.py index b6dc1c0d..ace4fead 100644 --- a/NewIntegrationTest.py +++ b/NewIntegrationTest.py @@ -198,7 +198,7 @@ if len( sys.argv ) > 1 and sys.argv[ 1 ] == "--record": class_, method = method.split( "." ) method = "test" + method print "Recording method", method, "of class", class_ - exec "testCase = " + class_ + "( methodName = method )" + testCase = eval( class_ )( methodName = method ) method = getattr( testCase, method ) TestCase.setUp = TestCase.setUpForRecord TestCase.tearDown = TestCase.tearDownForRecord