[GRASS-SVN] r63795 - grass/trunk/lib/python/gunittest
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Dec 27 18:21:20 PST 2014
Author: wenzeslaus
Date: 2014-12-27 18:21:19 -0800 (Sat, 27 Dec 2014)
New Revision: 63795
Modified:
grass/trunk/lib/python/gunittest/reporters.py
Log:
gunittest: provide (relative) path to the test file in the report
* to open it with text editor
* quick fix, needs to be done properly (needs to go to data structures and files)
Modified: grass/trunk/lib/python/gunittest/reporters.py
===================================================================
--- grass/trunk/lib/python/gunittest/reporters.py 2014-12-28 02:12:00 UTC (rev 63794)
+++ grass/trunk/lib/python/gunittest/reporters.py 2014-12-28 02:21:19 UTC (rev 63795)
@@ -671,11 +671,14 @@
status=returncode_to_success_html_par(returncode),
))
- # TODO: include optionaly link to test suite
+ # TODO: include optionaly hyper link to test suite
+ # TODO: file_path is reconstucted in a naive way
+ # file_path should be stored in the module/test file object and just used here
summary_section = (
'<table><tbody>'
- '<tr><td>Test file</td><td>{m}</td></tr>'
+ '<tr><td>Test</td><td>{m}</td></tr>'
'<tr><td>Testsuite</td><td>{d}</td></tr>'
+ '<tr><td>Test file</td><td>{file_path}</td></tr>'
'<tr><td>Status</td><td>{status}</td></tr>'
'<tr><td>Return code</td><td>{rc}</td></tr>'
'<tr><td>Number of tests</td><td>{ntests}</td></tr>'
@@ -685,6 +688,7 @@
'<tr><td>Test duration</td><td>{dur}</td></tr>'
.format(
d=module.tested_dir, m=module.name,
+ file_path=os.path.join(module.tested_dir, 'testsuite', module.name + '.' + module.file_type),
status=returncode_to_html_text(returncode),
stests=successes, ftests=bad_ones, ntests=total,
ptests=pass_per, rc=returncode,
More information about the grass-commit
mailing list