Python Coverage: testing a program

Terry Reedy tjreedy at udel.edu
Thu Oct 24 19:55:38 EDT 2013


On 10/24/2013 6:36 PM, Terry Reedy wrote:

> OK, I added .coveragerc and that works. In the process of verifying
> this, I was reminded that there is an overt bug in the html report as
> displayed by Firefox. The fonts used for line numbers
> ("class='linenos'") and line text ("class='text'") are slightly
> different and, more importantly, with difference sizes (line numbers are
> larger). So corresponding numbers and text do not line up with each
> other. This makes the J,K hotkeys and missing branch notations much less
> useful than intended. If I use cntl-scrollwheel to change text size,
> both change in the same proportion, so the mismatch is maintained.

I found the style.css file and the linenos entry that works to make 
numbers and text line us is, *after correction*:

/* Source file styles */
.linenos p {
     text-align: right;
     margin: 0;
     padding: 0 .5em 0 .5em;
     color: #999999;
     font-family: verdana, sans-serif;
     font-size: .625em;   /* 10/16 */
     /* line-height: 1.6em;  /* 16/10 */
     }

Padding was '0 .5em', which I gather is the same as '0 .5em .5em .5em', 
which adds padding to both top and bottom, instead of just one of the 
two. The corresponding text padding is '0 0 0 .5em'. The extra .5 for 
numbers puts padding needed on the right to separate numbers from the 
vertical green bars. The commented-out line-height added to mis-alignment.

The verdana numerals *are* larger than those for the inherited page 
default (font: 'inherit' at the top of the file). But they do not cause 
misalignment.

-- 
Terry Jan Reedy




More information about the Python-list mailing list