Skip to content

Commit c7fdb1c

Browse files
Inviromarcharper
authored andcommittedNov 5, 2019
Added documentation to the doctests.py
Added Numpy Style documentation to the file, and a small side-note about the ELLIPSIS option from doctest online documentation.
1 parent 7d3fc42 commit c7fdb1c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
 

‎doctests.py

+16
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,27 @@
66

77
# Note loader and ignore are required arguments for unittest even if unused.
88
def load_tests(loader, tests, ignore):
9+
"""
10+
Locates and returns a collection of unittests in a TestSuite object
11+
Parameters
12+
----------
13+
loader :
14+
A required but unused parameter.
15+
tests :
16+
A unittest TestSuite object for collecting the needed test cases.
17+
ignore :
18+
A required but unused parameter.
19+
Returns
20+
-------
21+
tests :
22+
A unittest TestSuite object that holds test cases.
23+
"""
924
for root, dirs, files in os.walk("."):
1025
for f in files:
1126
if f.endswith(".rst"):
1227
tests.addTests(
1328
doctest.DocFileSuite(
29+
# ELLIPSIS option tells doctest to ignore portions of the verification value.
1430
os.path.join(root, f), optionflags=doctest.ELLIPSIS
1531
)
1632
)

0 commit comments

Comments
 (0)