Skip to content

Commit 8180716

Browse files
committed
Added a couple of assertion to help understand test coverage percentage variations
- Legacy-Id: 15751
1 parent 5cd1554 commit 8180716

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

ietf/meeting/views.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
from ietf.secr.proceedings.proc_utils import (get_progress_stats, post_process, import_audio_files,
6464
create_recording)
6565
from ietf.utils.decorators import require_api_key
66+
from ietf.utils.log import assertion
6667
from ietf.utils.mail import send_mail_message, send_mail_text
6768
from ietf.utils.pipe import pipe
6869
from ietf.utils.pdf import pdf_pages
@@ -722,7 +723,8 @@ def session_draft_pdf(request, num, acronym):
722723
pdfmarks.close()
723724
pdfh, pdfn = mkstemp()
724725
os.close(pdfh)
725-
pipe("gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=" + pdfn + " " + pdf_list + " " + pmn)
726+
code, out, err = pipe("gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=" + pdfn + " " + pdf_list + " " + pmn)
727+
assertion('code == 0')
726728

727729
pdf = open(pdfn,"r")
728730
pdf_contents = pdf.read()

ietf/submit/checkers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
import debug # pyflakes:ignore
1515

16-
from ietf.utils.log import log
16+
from ietf.utils.log import log, assertion
1717
from ietf.utils.models import VersionInfo
1818
from ietf.utils.pipe import pipe
1919
from ietf.utils.test_runner import set_coverage_checking
@@ -206,6 +206,7 @@ def check_file_txt(self, path):
206206
code, out, err = pipe(cmd)
207207
if code > 0 or len(err.strip()) > 0 :
208208
error_lines = err.splitlines()
209+
assertion('len(error_lines) > 0')
209210
for line in error_lines:
210211
if line.strip():
211212
try:

0 commit comments

Comments
 (0)