Skip to content

Commit 34d69b8

Browse files
committed
Fix owngil_import_concurrent_test using non-callable as function
string.ascii_lowercase is a string constant, not a callable function. The test was failing for contexts that included the string module because calling it raised TypeError. Use string.capwords instead.
1 parent 2eab7fe commit 34d69b8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

test/py_import_owngil_SUITE.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ owngil_import_concurrent_test(_Config) ->
323323
<<"json">> -> py_context:call(Ctx, json, dumps, [[N]]);
324324
<<"math">> -> py_context:call(Ctx, math, sqrt, [float(N)]);
325325
<<"os">> -> py_context:call(Ctx, os, getcwd, []);
326-
<<"string">> -> py_context:call(Ctx, string, ascii_lowercase, []);
326+
<<"string">> -> py_context:call(Ctx, string, capwords, [<<"hello world">>]);
327327
<<"re">> -> py_context:call(Ctx, re, escape, [<<"test">>])
328328
end
329329
end, MyModules),

0 commit comments

Comments
 (0)