Python bindings: add missing on_key_data callback #7

Merged
andrew merged 2 commits from weaselbot/weaseljson:weaselbot/issue-6 into main 2026-06-18 15:01:56 +00:00
2 changed files with 4 additions and 7 deletions
Showing only changes of commit 7ea2e2362e - Show all commits
+3 -4
View File
@@ -165,10 +165,9 @@ doctest_discover_tests(mytest WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
find_package(Python3 COMPONENTS Interpreter) find_package(Python3 COMPONENTS Interpreter)
if(Python3_Interpreter_FOUND) if(Python3_Interpreter_FOUND)
add_test( add_test(NAME python_bindings
NAME python_bindings COMMAND ${Python3_EXECUTABLE}
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test_python_bindings.py)
${CMAKE_CURRENT_SOURCE_DIR}/test_python_bindings.py)
endif() endif()
include(CMakePushCheckState) include(CMakePushCheckState)
+1 -3
View File
@@ -73,9 +73,7 @@ def test_mixed_values():
with weaseljson.WeaselJsonParser(recorder) as parser: with weaseljson.WeaselJsonParser(recorder) as parser:
status = parse_all( status = parse_all(
parser, parser,
json.dumps( json.dumps({"answer": 42, "yes": True, "no": False, "nil": None}).encode(),
{"answer": 42, "yes": True, "no": False, "nil": None}
).encode(),
) )
assert status == weaseljson.WeaselJsonStatus.OK, status assert status == weaseljson.WeaselJsonStatus.OK, status