forked from weaselab/weaseljson
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:
+3
-4
@@ -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)
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user