Merge pull request #5352 from tk0miya/improve_pytest_header

Improve pytest header
This commit is contained in:
Takeshi KOMIYA 2018-08-27 01:20:42 +09:00 committed by GitHub
commit c5c023cb68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -61,8 +61,7 @@ if __version__.endswith('+'):
__version__ = __version__[:-1] # remove '+' for PEP-440 version spec. __version__ = __version__[:-1] # remove '+' for PEP-440 version spec.
try: try:
import subprocess import subprocess
p = subprocess.Popen(['git', 'show', '-s', '--pretty=format:%h', p = subprocess.Popen(['git', 'show', '-s', '--pretty=format:%h'],
path.join(package_dir, '..')],
stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = p.communicate() out, err = p.communicate()
if out: if out:

View File

@ -11,8 +11,10 @@ import os
import shutil import shutil
import sys import sys
import docutils
import pytest import pytest
import sphinx
from sphinx.testing.path import path from sphinx.testing.path import path
pytest_plugins = 'sphinx.testing.fixtures' pytest_plugins = 'sphinx.testing.fixtures'
@ -34,8 +36,8 @@ def rootdir():
def pytest_report_header(config): def pytest_report_header(config):
return 'Running Sphinx test suite (with Python %s)...' % ( return ("libraries: Sphinx-%s, docutils-%s" %
sys.version.split()[0]) (sphinx.__display_version__, docutils.__version__))
def _initialize_test_directory(session): def _initialize_test_directory(session):