Commit 6ce76736 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Add some more param names

and disable a sqlalchemy test that was overspecific
parent 50128e6f
...@@ -1662,8 +1662,10 @@ void setupCAPI() { ...@@ -1662,8 +1662,10 @@ void setupCAPI() {
capifunc_cls->giveAttr("__repr__", new BoxedFunction(BoxedCode::create((void*)BoxedCApiFunction::__repr__<CXX>, capifunc_cls->giveAttr("__repr__", new BoxedFunction(BoxedCode::create((void*)BoxedCApiFunction::__repr__<CXX>,
UNKNOWN, 1, "capifunc.__repr__"))); UNKNOWN, 1, "capifunc.__repr__")));
auto capi_call = new BoxedFunction(
BoxedCode::create((void*)BoxedCApiFunction::__call__, UNKNOWN, 1, true, true, "capifunc.__call__")); auto capi_call
= new BoxedFunction(BoxedCode::create((void*)BoxedCApiFunction::__call__, UNKNOWN, 1, true, true,
"capifunc.__call__", "", ParamNames({ "self" }, "args", "kw")));
capifunc_cls->giveAttr("__call__", capi_call); capifunc_cls->giveAttr("__call__", capi_call);
capifunc_cls->tpp_call.capi_val = BoxedCApiFunction::tppCall<CAPI>; capifunc_cls->tpp_call.capi_val = BoxedCApiFunction::tppCall<CAPI>;
capifunc_cls->tpp_call.cxx_val = BoxedCApiFunction::tppCall<CXX>; capifunc_cls->tpp_call.cxx_val = BoxedCApiFunction::tppCall<CXX>;
......
...@@ -598,11 +598,14 @@ void setupDescr() { ...@@ -598,11 +598,14 @@ void setupDescr() {
ParamNames({ "", "fget", "fset", "fdel", "doc" }, "", "")), ParamNames({ "", "fget", "fset", "fdel", "doc" }, "", "")),
{ Py_None, Py_None, Py_None, NULL })); { Py_None, Py_None, Py_None, NULL }));
property_cls->giveAttr("__get__", property_cls->giveAttr("__get__",
new BoxedFunction(BoxedCode::create((void*)propertyGet, UNKNOWN, 3, "property.__get__"))); new BoxedFunction(BoxedCode::create((void*)propertyGet, UNKNOWN, 3, "property.__get__", "",
ParamNames({ "self", "obj", "type" }, "", ""))));
property_cls->giveAttr("__set__", property_cls->giveAttr("__set__",
new BoxedFunction(BoxedCode::create((void*)propertySet, UNKNOWN, 3, "property.__set__"))); new BoxedFunction(BoxedCode::create((void*)propertySet, UNKNOWN, 3, "property.__set__", "",
ParamNames({ "self", "obj", "value" }, "", ""))));
property_cls->giveAttr("__delete__", property_cls->giveAttr("__delete__",
new BoxedFunction(BoxedCode::create((void*)propertyDel, UNKNOWN, 2, "property.__delete__"))); new BoxedFunction(BoxedCode::create((void*)propertyDel, UNKNOWN, 2, "property.__delete__",
"", ParamNames({ "self", "obj" }, "", ""))));
property_cls->giveAttr("getter", property_cls->giveAttr("getter",
new BoxedFunction(BoxedCode::create((void*)propertyGetter, UNKNOWN, 2, "property.getter"))); new BoxedFunction(BoxedCode::create((void*)propertyGetter, UNKNOWN, 2, "property.getter")));
property_cls->giveAttr("setter", property_cls->giveAttr("setter",
......
...@@ -4499,7 +4499,8 @@ void setupRuntime() { ...@@ -4499,7 +4499,8 @@ void setupRuntime() {
"__get__", "__get__",
new BoxedFunction(BoxedCode::create((void*)functionGet, UNKNOWN, 3, "function.__get__"), { Py_None })); new BoxedFunction(BoxedCode::create((void*)functionGet, UNKNOWN, 3, "function.__get__"), { Py_None }));
function_cls->giveAttr("__call__", new BoxedFunction(BoxedCode::create((void*)functionCall, UNKNOWN, 1, true, true, function_cls->giveAttr("__call__", new BoxedFunction(BoxedCode::create((void*)functionCall, UNKNOWN, 1, true, true,
"function.__call__"))); "function.__call__", "",
ParamNames({ "self" }, "args", "kw"))));
function_cls->giveAttr("__nonzero__", new BoxedFunction(BoxedCode::create((void*)functionNonzero, BOXED_BOOL, 1, function_cls->giveAttr("__nonzero__", new BoxedFunction(BoxedCode::create((void*)functionNonzero, BOXED_BOOL, 1,
"function.__nonzero__"))); "function.__nonzero__")));
function_cls->giveAttrDescriptor("func_code", function_code, function_set_code); function_cls->giveAttrDescriptor("func_code", function_code, function_set_code);
...@@ -4518,7 +4519,8 @@ void setupRuntime() { ...@@ -4518,7 +4519,8 @@ void setupRuntime() {
offsetof(BoxedBuiltinFunctionOrMethod, modname)); offsetof(BoxedBuiltinFunctionOrMethod, modname));
builtin_function_or_method_cls->giveAttr( builtin_function_or_method_cls->giveAttr(
"__call__", new BoxedFunction(BoxedCode::create((void*)builtinFunctionOrMethodCall, UNKNOWN, 1, true, true, "__call__", new BoxedFunction(BoxedCode::create((void*)builtinFunctionOrMethodCall, UNKNOWN, 1, true, true,
"builtin_function_or_method.__call__"))); "builtin_function_or_method.__call__", "",
ParamNames({ "self" }, "args", "kw"))));
builtin_function_or_method_cls->giveAttr( builtin_function_or_method_cls->giveAttr(
"__repr__", new BoxedFunction(BoxedCode::create((void*)builtinFunctionOrMethodRepr, STR, 1, "__repr__", new BoxedFunction(BoxedCode::create((void*)builtinFunctionOrMethodRepr, STR, 1,
...@@ -4538,9 +4540,9 @@ void setupRuntime() { ...@@ -4538,9 +4540,9 @@ void setupRuntime() {
instancemethod_cls->giveAttr("__get__", instancemethod_cls->giveAttr("__get__",
new BoxedFunction(BoxedCode::create((void*)instancemethodGet, UNKNOWN, 3, false, false, new BoxedFunction(BoxedCode::create((void*)instancemethodGet, UNKNOWN, 3, false, false,
"instancemethod.__get__"))); "instancemethod.__get__")));
instancemethod_cls->giveAttr("__call__", instancemethod_cls->giveAttr("__call__", new BoxedFunction(BoxedCode::create(
new BoxedFunction(BoxedCode::create((void*)instancemethodCall, UNKNOWN, 1, true, true, (void*)instancemethodCall, UNKNOWN, 1, true, true,
"instancemethod.__call__"))); "instancemethod.__call__", "", ParamNames({ "self" }, "args", "kw"))));
instancemethod_cls->giveAttrMember("im_func", T_OBJECT, offsetof(BoxedInstanceMethod, func)); instancemethod_cls->giveAttrMember("im_func", T_OBJECT, offsetof(BoxedInstanceMethod, func));
instancemethod_cls->giveAttrBorrowed("__func__", instancemethod_cls->getattr(getStaticString("im_func"))); instancemethod_cls->giveAttrBorrowed("__func__", instancemethod_cls->getattr(getStaticString("im_func")));
instancemethod_cls->giveAttrMember("im_self", T_OBJECT, offsetof(BoxedInstanceMethod, obj)); instancemethod_cls->giveAttrMember("im_self", T_OBJECT, offsetof(BoxedInstanceMethod, obj));
......
...@@ -9,10 +9,10 @@ create_virtenv(ENV_NAME, ["cheetah==2.4.4", "Markdown==2.0.1"], force_create = T ...@@ -9,10 +9,10 @@ create_virtenv(ENV_NAME, ["cheetah==2.4.4", "Markdown==2.0.1"], force_create = T
cheetah_exe = os.path.join(ENV_NAME, "bin", "cheetah") cheetah_exe = os.path.join(ENV_NAME, "bin", "cheetah")
env = os.environ env = os.environ
env["PATH"] = os.path.join(ENV_NAME, "bin") env["PATH"] = os.path.join(ENV_NAME, "bin")
expected = [{'ran': 2138, 'errors': 4}, {'ran': 2138, 'errors': 232, 'failures': 2}] expected = [{'ran': 2138}, {'ran': 2138, 'errors': 228, 'failures': 2}]
expected_log_hash = ''' expected_log_hash = '''
jcoDAKUIQTpEDIDiMwAuQFEAKABjEbNAAAACgqABAAGgGsGQaQQLg/l0gIQXbEA4IKQisBIAAlOQ jcoCAIUIQTJEDoDiMwAuQFEAKABjEbMAAAACgqAAAAGgGsGAaQQKg3l0AIQWbEAwIKQmkBIAAlOQ
IG4lA5AAASAqqGdMCPAAALKbAEQAYAcCEgRHAQCAAhAVJIghShwAUpAAKaEwgk0GaEUkgQIIADgb IE4kA5AAASAqiGdMCPAAALKLAEwAYAcCEgRHAQCAAhAVJIghShwAUoAAKaEwgk0EaEUkgQAIADgb
pKTQYrIACAshhJ6Bwh0= pKTQYrIACAshhJ6Bwh0=
''' '''
run_test([cheetah_exe, "test"], cwd=ENV_NAME, expected=expected, env=env, expected_log_hash=expected_log_hash) run_test([cheetah_exe, "test"], cwd=ENV_NAME, expected=expected, env=env, expected_log_hash=expected_log_hash)
...@@ -247,6 +247,9 @@ for run_idx in xrange(1): ...@@ -247,6 +247,9 @@ for run_idx in xrange(1):
if (clsname == "SubclassGrowthTest" and t == "test_subclass"): if (clsname == "SubclassGrowthTest" and t == "test_subclass"):
continue continue
if (clsname == "ArgInspectionTest" and t == 'test_callable_argspec_py_builtin'):
continue
print "Running", t print "Running", t
n.setup() n.setup()
try: try:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment