Skip to content

Commit dffc3dc

Browse files
committed
test the right thing
1 parent 6536694 commit dffc3dc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

unpythonic/tests/test_dispatch.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,10 @@ def instmeth(self, x: float):
232232
with testset("@typed"):
233233
test[blubnify(2, 21.0) == 42]
234234
test_raises[TypeError, blubnify(2, 3)] # blubnify only accepts (int, float)
235-
test[not hasattr(blubnify, "register")] # and no more methods can be registered on it
235+
with test_raises[TypeError, "should not be able to add more multimethods to a @typed function"]:
236+
@augment(blubnify)
237+
def blubnify2(x: float, y: float):
238+
pass
236239

237240
test[jack(42) == 42]
238241
test[jack("foo") == "foo"]

0 commit comments

Comments
 (0)