migliorie grafiche al template dei test

This commit is contained in:
mac12m99
2021-01-28 19:52:04 +01:00
parent a9ff01be70
commit bb3ed403bd

View File

@@ -5,6 +5,13 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<style>
textarea {
font-family: monospace;
box-sizing: border-box;
width: 100%;
}
</style>
</head>
<body>
<div class="container-fluid">
@@ -55,7 +62,9 @@
{%- if (test_case.stdout or test_case.err or test_case.err) and test_case.outcome != test_case.SKIP %}
<tr style="display:none;">
<td class="col-xs-9" colspan="3">
{%- if test_case.stdout %}<p style="white-space: pre-line;">{{ test_case.stdout|e }}</p>{% endif %}
<textarea rows="40" readonly>
{%- if test_case.stdout %}{{ test_case.stdout|e }}{% endif %}
</textarea>
{%- if test_case.err %}<p style="color:maroon;">{{ test_case.err[0].__name__ }}: {{ test_case.err[1] }}</p>{% endif %}
</td>
</tr>
@@ -63,7 +72,9 @@
{%- if (test_case.stdout or test_case.err or test_case.err) and test_case.outcome == test_case.SKIP %}
<tr style="display:none;">
<td class="col-xs-9" colspan="3">
{%- if test_case.stdout %}<p style="white-space: pre-line;">{{ test_case.stdout|e }}</p>{% endif %}
<textarea rows="40" readonly>
{%- if test_case.stdout %}{{ test_case.stdout|e }}{% endif %}
</textarea>
{%- if test_case.err %}<p style="color:maroon;">{{ test_case.err }}</p>{% endif %}
</td>
</tr>
@@ -113,8 +124,10 @@
{%- if subtest.err or subtest.err %}
<tr style="display:none;">
<td class="col-xs-9" colspan="3">
<textarea rows="40" readonly>
{%- if subtest.err %}{{ subtest.err[0].__name__ }}: {{ subtest.err[1] }}{% endif %}
</textarea>
{%- if subtest.err %}<p style="color:maroon;">{{ subtest.test_exception_info }}</p>{% endif %}
{%- if subtest.err %}<p style="color:maroon;">{{ subtest.err[0].__name__ }}: {{ subtest.err[1] }}</p>{% endif %}
</td>
</tr>
{%- endif %}