Skip to content

Commit

Permalink
Output python version in testsuite name (dbcli#274)
Browse files Browse the repository at this point in the history
In the Azure Devops test results, all tox runs show as 'pytest'. With this PR we include the python version in the name to distinguish between the tox results.
  • Loading branch information
pensivebrian authored Aug 24, 2019
1 parent 6728e39 commit e7d71b2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion build.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import os
import sys
import uuid
import platform
import utility

# Environment variables below allow the build process to use a python interpreter and pip version different
Expand Down Expand Up @@ -121,8 +122,10 @@ def unit_test():
Run all unit tests.
"""
runid = str(uuid.uuid1())
python_version = platform.python_version()
utility.exec_command(
'pytest --cov mssqlcli --doctest-modules --junitxml=junit/test-{}-results.xml --cov-report=xml --cov-report=html --cov-append '
'-o junit_suite_name=pytest-{} '
'tests/test_mssqlcliclient.py '
'tests/test_completion_refresher.py '
'tests/test_config.py '
Expand All @@ -135,7 +138,7 @@ def unit_test():
'mssqlcli/jsonrpc/tests '
'mssqlcli/jsonrpc/contracts/tests '
'tests/test_telemetry.py '
'tests/test_special.py'.format(runid),
'tests/test_special.py'.format(runid, python_version),
utility.ROOT_DIR,
continue_on_error=False)

Expand Down

0 comments on commit e7d71b2

Please sign in to comment.