We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
return
with test
1 parent c2577d0 commit 8a3334aCopy full SHA for 8a3334a
unpythonic/test/test_fun.py
@@ -188,7 +188,8 @@ def double(x):
188
# To disable the error, use this trick to explicitly state you want to do so:
189
with test("leftover args should be allowed with manually created surrounding context"):
190
with dyn.let(curry_context=["whatever"]): # any human-readable label is fine.
191
- curry(double, 2, "foo") == (4, "foo")
+ # a `with test` can optionally return a value, which becomes the asserted expr.
192
+ return curry(double, 2, "foo") == (4, "foo")
193
194
# Methods of builtin types have uninspectable arity up to Python 3.6.
195
# Python 3.7 seems to fix this at least for `list`, and PyPy3 (7.3.0; Python 3.6.9)
0 commit comments