Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use double quotes in HTML output to accommodate limited third-party tools #361

Closed
nedbat opened this issue Mar 2, 2015 · 8 comments
Closed
Labels
bug Something isn't working html

Comments

@nedbat
Copy link
Owner

nedbat commented Mar 2, 2015

Originally reported by Robin James Kerrison (Bitbucket: rjkerrison, GitHub: rjkerrison)


The coverage.py HTML output wraps the values of attributes in single quotes, thusly:

#!html
<head>
    <meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
    <title>Coverage report</title>
    <link rel='stylesheet' href='style.css' type='text/css'>
    
    <script type='text/javascript' src='jquery.min.js'></script>
    <script type='text/javascript' src='jquery.tablesorter.min.js'></script>
    <script type='text/javascript' src='jquery.hotkeys.js'></script>
    <script type='text/javascript' src='coverage_html.js'></script>
    <script type='text/javascript' charset='utf-8'>
        jQuery(document).ready(coverage.index_ready);
    </script>
</head>

It should be wrapping in double quotes, or at least there should be an easy way to configure using double quotes.

Current behaviour is an issue when trying to use coverage.py alongside CCNet, since the former outputs single quotes and the latter only searches for double quotes when resolving sources and anchors using its RetrieveBuildFile handler.


@nedbat
Copy link
Owner Author

nedbat commented Mar 2, 2015

I don't understand what CCNet is doing: why is it looking through the coverage.py HTML report? And why doesn't it know that single quotes are valid HTML?

@nedbat
Copy link
Owner Author

nedbat commented Mar 2, 2015

Original comment by Robin James Kerrison (Bitbucket: rjkerrison, GitHub: rjkerrison)


I'm running

#!xml
<tasks>
	<exec>
		<executable>C:\Python27\Scripts\coverage.exe</executable>
		<baseDirectory>F:\MyPythonSolution</baseDirectory>
		<buildArgs>run "F:\MyPythonSolution\tests.py"</buildArgs>
		<buildTimeoutSeconds>600</buildTimeoutSeconds>
	</exec>
	<exec>
		<executable>C:\Python27\Scripts\coverage.exe</executable>
		<baseDirectory>F:\MyPythonSolution</baseDirectory>
		<buildArgs>html --omit=*/tests/*,*runtests*,*__init__* -d "$[$CCNetArtifactDirectory]\$[$CCNetLabel]\coveragereport"</buildArgs>
		<buildTimeoutSeconds>600</buildTimeoutSeconds>
	</exec>
</tasks>

which outputs the html coverage report into a folder which is later read by CCNet's htmlReportPlugin:

#!xml
<htmlReportPlugin description="Coverage Report" actionName="myPythonCoverageReport" htmlFileName="coveragereport\index.html">
	<includedProjects>
		<projectName>MyPython Code Coverage</projectName>
	</includedProjects>
</htmlReportPlugin>

This question at StackOverflow describes the same CCNet issue.

@nedbat
Copy link
Owner Author

nedbat commented Mar 2, 2015

Have you reported this bug against CCNet? I looked, but could not find a bug tracker for them.

@nedbat
Copy link
Owner Author

nedbat commented Mar 2, 2015

Original comment by Robin James Kerrison (Bitbucket: rjkerrison, GitHub: rjkerrison)


Issue reported against CCNet at http://www.cruisecontrolnet.org/issues/355.

As your new title suggests, there may be other clashes with other similarly short-sighted tools, so it would still be an advantage to have an option to switch to double quotes.

@nedbat
Copy link
Owner Author

nedbat commented Mar 2, 2015

Thanks for reporting the bug to them. There's no need for an option here, I can change them to double quotes. It just irks me to have to. :)

@nedbat
Copy link
Owner Author

nedbat commented Apr 16, 2015

Fix Issue 361, and update tests accordingly.

→ <<cset 12ea7ddb2186 (bb)>>

@nedbat
Copy link
Owner Author

nedbat commented Apr 16, 2015

close issue361

→ <<cset 36a5775a9a6e (bb)>>

@nedbat
Copy link
Owner Author

nedbat commented Sep 6, 2015

Not sure why this was marked as closed instead of resolved.

@nedbat nedbat closed this as completed Sep 6, 2015
@nedbat nedbat added minor bug Something isn't working html labels Jun 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working html
Projects
None yet
Development

No branches or pull requests

1 participant