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.
try:
import subprocess
p = subprocess.Popen(['git', 'show', '-s', '--pretty=format:%h',
path.join(package_dir, '..')],
p = subprocess.Popen(['git', 'show', '-s', '--pretty=format:%h'],
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = p.communicate()
if out:

View File

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