Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Merge branch 'main' into flow-control-opcodes-3.8
Merge in changes associated with adding a builtins module. The
difference for the conditionals is in the tests, where we now create an
interpreter explicitly.
  • Loading branch information
jeff5 committed Feb 4, 2023
commit 953bf0d02220331e7d1d74f667fe50ba4ae9ecf4
7 changes: 5 additions & 2 deletions core/src/test/java/org/python/core/CPython38CodeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ void co_consts() {
@DisplayName("We can execute simple ...")
@ParameterizedTest(name = "{0}.py")
@ValueSource(strings = {"load_store_name", "unary_op", "binary_op", "bool_left_arith",
"bool_right_arith", "comparison", "tuple_index", "list_index", "call_method_builtin"})
"bool_right_arith", "comparison", "tuple_index", "list_index", "call_method_builtin",
"builtins_module"})
void executeSimple(String name) {
CPython38Code code = readCode(name);
Interpreter interp = new Interpreter();
Expand All @@ -150,8 +151,10 @@ void executeSimple(String name) {
"list_dot_product"})
void executeBranchAndLoop(String name) {
CPython38Code code = readCode(name);
Interpreter interp = new Interpreter();
PyDict globals = new PyDict();
code.createFrame(null, globals, globals).eval();
PyFrame<?> f = code.createFrame(interp, globals, globals);
f.eval();
assertExpectedVariables(readResultDict(name), globals);
}

Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.