Skip to content

Commit 8a3334a

Browse files
committed
use a return in a with test in the one place where appropriate
1 parent c2577d0 commit 8a3334a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

unpythonic/test/test_fun.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,8 @@ def double(x):
188188
# To disable the error, use this trick to explicitly state you want to do so:
189189
with test("leftover args should be allowed with manually created surrounding context"):
190190
with dyn.let(curry_context=["whatever"]): # any human-readable label is fine.
191-
curry(double, 2, "foo") == (4, "foo")
191+
# a `with test` can optionally return a value, which becomes the asserted expr.
192+
return curry(double, 2, "foo") == (4, "foo")
192193

193194
# Methods of builtin types have uninspectable arity up to Python 3.6.
194195
# Python 3.7 seems to fix this at least for `list`, and PyPy3 (7.3.0; Python 3.6.9)

0 commit comments

Comments
 (0)