Commit dab35a5f authored by Alberto Miranda's avatar Alberto Miranda ♨️ Committed by Marc Vef
Browse files

Fix logging error

parent f99dcad6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ def caplog(test_workspace, request, _caplog):
    test_log_path = test_workspace.logdir / (request.node.name + ".log")

    h = initialize_logging(logger, test_log_path)
    report_test_headline(logger, request.node.nodeid, request.config)
    report_test_headline(logger, request.node.nodeid, request.config, test_workspace)

    yield _caplog

+2 −1
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@ def _format_exception(report):

    return tw._file.getvalue()

def report_test_headline(logger, testid, config):
def report_test_headline(logger, testid, config, workspace):
    """
    Emit a log message describing a test configuration
    """
@@ -82,6 +82,7 @@ def report_test_headline(logger, testid, config):
        msg += ", testpaths: {}".format(", ".join(rel_paths))

    lg.info(f"<normal>{msg}</>")
    lg.info(f"<normal>workspace: {workspace.twd}</>")
    lg.info(f"\n<yellow>{_add_sep('=', testid)}</>\n")

def report_test_status(logger, report):
+0 −1
Original line number Diff line number Diff line
@@ -42,7 +42,6 @@ class Workspace:
            List of paths where libraries required for the test should be
            searched for.
        """
        logger.info(f"test workspace created at {twd}")

        self._twd = twd
        self._bindirs = bindirs