Skip to content

Commit 4e63613

Browse files
committed
Add doctests to flesh out coverage.
1 parent eb7f123 commit 4e63613

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

importlib_resources/_common.py

+9
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@
1919
def package_to_anchor(func):
2020
"""
2121
Replace 'package' parameter as 'anchor' and warn about the change.
22+
23+
Other errors should fall through.
24+
25+
>>> files()
26+
Traceback (most recent call last):
27+
TypeError: files() missing 1 required positional argument: 'anchor'
28+
>>> files('a', 'b')
29+
Traceback (most recent call last):
30+
TypeError: files() takes 1 positional argument but 2 were given
2231
"""
2332
undefined = object()
2433

0 commit comments

Comments
 (0)