test_handler: Add title for test sections which use test_handler.

This commit is contained in:
neiljp (Neil Pilgrim) 2018-06-09 12:52:05 -07:00 committed by showell
parent 2fd9162030
commit de5fa0e8fc

View file

@ -5,6 +5,7 @@ import sys
import argparse
import unittest
import pytest
import shutil
TOOLS_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
os.chdir(os.path.dirname(TOOLS_DIR))
@ -26,6 +27,10 @@ def handle_input_and_run_tests_for_package(package_name, path_list):
help='show verbose output (with pytest)')
options = parser.parse_args()
test_session_title = ' Running tests for {} '.format(package_name)
header = test_session_title.center(shutil.get_terminal_size().columns, '#')
print(header)
if options.coverage:
import coverage
cov = coverage.Coverage(config_file="tools/.coveragerc")