python(tests): print logging when running tests in verbose mode

This commit is contained in:
Yohan Boniface 2022-09-02 12:15:46 +02:00
parent 7e3a8111ba
commit 410cf61d94

View File

@ -9,6 +9,7 @@ tests under 'arc unit' and under Jenkins.
./sandbox/nacl/bin/run python /grist/runtests.py [--xunit]
"""
import codecs
import logging
import os
import sys
import unittest
@ -30,6 +31,9 @@ def main():
utf8_stdout = codecs.getwriter('utf8')(utf8_stdout)
test_runner = xmlrunner.XMLTestRunner(stream=utf8_stdout)
if "-v" in argv or "--verbose" in argv:
logging.basicConfig(level=logging.DEBUG)
if all(arg.startswith("-") for arg in argv[1:]):
argv.insert(1, "discover")