<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
On 4/5/18 6:44 AM, Gordon Wrigley wrote:<br>
<blockquote type="cite"
cite="mid:CAD-wiX1mGPpjt5QwANEdUfTikvFDp01xGKyKkWbkLNG6JnM9dA@mail.gmail.com">
<div dir="ltr"><span
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Hi</span>
<div
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br>
</div>
<div
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">Is
there an easy way to find pragma: no cover instances that
aren't actually required. Aka ones that actually are covered?
I have a code base with a bunch of these in and it'd be nice
to slowly remove them, the first step in that is figuring out
which of the current ones are actually necessary and which are
historical.</div>
</div>
</blockquote>
<br>
There isn't a built-in feature to do this, but there's a way: edit
your .coveragerc file (or create one), and define a new pragma
pattern (with [report] exclude_lines), so that your existing "no
cover" pragmas aren't recognized. Then run coverage again. You can
see how coverage is reported for your "no cover" lines, and decide
what to do about each one. Then put back your original .coveragerc
file.<br>
<br>
--Ned.<br>
<blockquote type="cite"
cite="mid:CAD-wiX1mGPpjt5QwANEdUfTikvFDp01xGKyKkWbkLNG6JnM9dA@mail.gmail.com">
<div dir="ltr">
<div
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br>
</div>
<div
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">Regards
G</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
testing-in-python mailing list
<a class="moz-txt-link-abbreviated" href="mailto:testing-in-python@lists.idyll.org">testing-in-python@lists.idyll.org</a>
<a class="moz-txt-link-freetext" href="http://lists.idyll.org/listinfo/testing-in-python">http://lists.idyll.org/listinfo/testing-in-python</a>
</pre>
</blockquote>
<br>
</body>
</html>