Skip to content

Commit 820f480

Browse files
committed
fix test, now the comment is actually correct
1 parent 0a2e6c0 commit 820f480

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

unpythonic/tests/test_dispatch.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,11 @@ def _example_impl(start, step, stop): # no @generic!
4242

4343
# shorter, same effect
4444
@generic
45-
def example2(start: int, stop: int):
46-
return example2(start, 1, stop) # just call the method that has the implementation
45+
def example2(stop: int):
46+
return example2(0, 1, stop) # just call the method that has the implementation
47+
@generic
48+
def example2(start: int, stop: int): # noqa: F811
49+
return example2(start, 1, stop)
4750
@generic
4851
def example2(start: int, step: int, stop: int): # noqa: F811
4952
return start, step, stop
@@ -92,6 +95,7 @@ def runtests():
9295
test[example(2, 10) == (2, 1, 10)]
9396
test[example(2, 3, 10) == (2, 3, 10)]
9497

98+
test[example2(5) == (0, 1, 5)]
9599
test[example2(1, 5) == (1, 1, 5)]
96100
test[example2(1, 1, 5) == (1, 1, 5)]
97101
test[example2(1, 2, 5) == (1, 2, 5)]

0 commit comments

Comments
 (0)