#!/usr/bin/env python3 """ Verify github_log_summary.py picks the right parser and reports every log """ import os import subprocess import sys import tempfile import unittest from github_log_summary import GINKGO_CLASS, GINKGO_CLASS_PREFIX # Assumes directory structure of this file relative to repo. SCRIPT_DIRPATH = os.path.dirname(os.path.realpath(__file__)) SCRIPT = os.path.join(SCRIPT_DIRPATH, 'github_log_summary.py') LOGFORMATTER = os.path.join(SCRIPT_DIRPATH, 'logformatter') # The stylesheet logformatter writes into every log names all the classes, so a # summary that looked for them in the raw html would call any log a ginkgo one. STYLE = """""" GINKGO_FAILURE = "Expected error to be nil, got: exit status 125" GINKGO_LOG = f"""
{STYLE} """ BATS_FAILURE = "# #| FAIL: exit code is 1; expected 0" BATS_LOG = f"""{STYLE}