MCPcopy Index your code
hub / github.com/CadQuery/cadquery / test_invoke

Function test_invoke

tests/test_sketch.py:898–910  ·  view source on GitHub ↗
(s1, s2)

Source from the content-addressed store, hash-verified

896
897
898def test_invoke(s1, s2):
899
900 # builtin
901 assert len(s2.invoke(print).vals()) == 5
902 # arity 0
903 assert len(s2.invoke(lambda: 1).vals()) == 5
904 # arity 1 and no return
905 assert len(s2.invoke(lambda x: None).vals()) == 5
906 # arity 1
907 assert len(s2.invoke(lambda x: s1).vals()) == 2
908 # test exception with wrong arity
909 with raises(ValueError):
910 s2.invoke(lambda x, y: 1)
911
912
913@fixture

Callers

nothing calls this directly

Calls 2

valsMethod · 0.45
invokeMethod · 0.45

Tested by

no test coverage detected