Kaynağa Gözat

BugFixes needed to update latex and python

master
Dirk Alders 4 yıl önce
ebeveyn
işleme
d243a1667e
2 değiştirilmiş dosya ile 8 ekleme ve 4 silme
  1. 6
    2
      run.py
  2. 2
    2
      templates/coverage/report.tex

+ 6
- 2
run.py Dosyayı Görüntüle

@@ -7,9 +7,13 @@ import reqif
7 7
 
8 8
 import json
9 9
 import os
10
+import sys
10 11
 import platform
12
+try:
13
+    from platform import dist as dist
14
+except ImportError:
15
+    from distro import linux_distribution as dist
11 16
 import getpass
12
-import sys
13 17
 import subprocess
14 18
 import imp
15 19
 import xml.dom.minidom
@@ -224,7 +228,7 @@ def unittest_init(unittest_folder):
224 228
     system_info['Architecture'] = platform.architecture()[0]
225 229
     system_info['Machine'] = platform.machine()
226 230
     system_info['Hostname'] = platform.node()
227
-    system_info['Distribution'] = ' '.join(platform.dist())
231
+    system_info['Distribution'] = ' '.join(dist())
228 232
     system_info['System'] = platform.system()
229 233
     system_info['Kernel'] = platform.release() + ' (%s)' % platform.version()
230 234
     system_info['Username'] = getpass.getuser()

+ 2
- 2
templates/coverage/report.tex Dosyayı Görüntüle

@@ -12,9 +12,9 @@
12 12
 {%- for fragment in py_file.fragments %}
13 13
     \lstset{backgroundcolor=\color{bg-{{fragment.coverage_state}}}}\vspace*{-2.7ex}
14 14
 {%- if fragment.end is not none %}
15
-    \lstinputlisting[language=Python, linerange={{fragment.start}}-{{fragment.end}}, firstnumber={{fragment.start}}]{ {{py_file.filepath}} }
15
+    \lstinputlisting[language=Python, linerange={{fragment.start}}-{{fragment.end}}, firstnumber={{fragment.start}}]{{ "{" ~ py_file.filepath ~ "}" }}
16 16
 {%- else %}
17
-    \lstinputlisting[language=Python, firstline={{fragment.start}}, firstnumber={{fragment.start}}]{ {{py_file.filepath}} }
17
+    \lstinputlisting[language=Python, firstline={{fragment.start}}, firstnumber={{fragment.start}}]{{ "{" ~ py_file.filepath ~ "}" }}
18 18
 {%- endif %}
19 19
 {%- endfor %}
20 20
 {% endfor %}

Loading…
İptal
Kaydet