mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 19:01:15 +00:00
Use a small eval instead of a big exec
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user