Skip to content
Snippets Groups Projects
Commit cb401867 authored by David Hendriks's avatar David Hendriks
Browse files

Updated docstrings

parent 0f14eeaa
No related branches found
No related tags found
No related merge requests found
Pipeline #31467 passed
......@@ -8,13 +8,13 @@
</clipPath>
<g clip-path="url(#r)">
<rect width="99" height="20" fill="#555"/>
<rect x="99" width="43" height="20" fill="#dfb317"/>
<rect x="99" width="43" height="20" fill="#4c1"/>
<rect width="142" height="20" fill="url(#s)"/>
</g>
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" font-size="110">
<text x="505" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="890">docstr-coverage</text>
<text x="505" y="140" transform="scale(.1)" textLength="890">docstr-coverage</text>
<text x="1195" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)">74%</text>
<text x="1195" y="140" transform="scale(.1)">74%</text>
<text x="1195" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)">98%</text>
<text x="1195" y="140" transform="scale(.1)">98%</text>
</g>
</svg>
\ No newline at end of file
......@@ -253,10 +253,12 @@ class catchtime(object):
"""
def __enter__(self):
"""On entry we start the clock"""
self.t = time.clock()
return self
def __exit__(self, type, value, traceback):
"""On exit we stop the clock and measure the time spent"""
self.t = time.clock() - self.t
print("Took {}s".format(self.t))
......@@ -276,11 +278,15 @@ class Capturing(list):
"""
def __enter__(self):
"""On entry we capture the stdout output"""
self._stdout = sys.stdout
sys.stdout = self._stringio = StringIO()
return self
def __exit__(self, *args):
"""On exit we release the capture again"""
self.extend(self._stringio.getvalue().splitlines())
del self._stringio # free up some memory
sys.stdout = self._stdout
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment