Skip to content

Commit 160bce7

Browse files
committed
1 parent faa4ad8 commit 160bce7

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test_routrie.py

+16
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,22 @@ def test_no_match() -> None:
5454
assert node is None
5555

5656

57+
def test_empty_path() -> None:
58+
router = Router(routes={"/": 0, "": 1,})
59+
60+
node = router.find("/")
61+
assert node is not None
62+
match, params = node
63+
assert match == 0
64+
assert params == []
65+
66+
node = router.find("")
67+
assert node is not None
68+
match, params = node
69+
assert match == 1
70+
assert params == []
71+
72+
5773
def test_serialization() -> None:
5874
router = Router({"/": 0})
5975

0 commit comments

Comments
 (0)