Example #1
0
def test_arguments_from_docstring():
    s = 'f(x, y, z)'
    a = arguments_from_docstring(s)
    assert_equal(a, ['x','y','z'])
    #this is a hard one
    s = 'Minuit.migrad( int ncall_me =10000, [resume=True, int nsplit=1])'
    a = arguments_from_docstring(s)
    assert_equal(a, ['ncall_me','resume','nsplit'])
Example #2
0
def test_arguments_from_docstring():
    s = "f(x, y, z)"
    a = arguments_from_docstring(s)
    assert a == ["x", "y", "z"]
    # this is a hard one
    s = "Minuit.migrad( int ncall_me =10000, [resume=True, int nsplit=1])"
    a = arguments_from_docstring(s)
    assert a == ["ncall_me", "resume", "nsplit"]