Apply formatting fixes from cmake-format and black

Reformat the add_test call in CMakeLists.txt and collapse a
multi-line json.dumps() call in test_python_bindings.py so that
pre-commit passes.
This commit is contained in:
2026-06-18 10:55:18 -04:00
parent 320e03f280
commit 7ea2e2362e
2 changed files with 4 additions and 7 deletions
+1 -2
View File
@@ -165,8 +165,7 @@ 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()
+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