Skip to content

Commit

Permalink
Improve pytest header
Browse files Browse the repository at this point in the history
  • Loading branch information
tk0miya committed Aug 26, 2018
1 parent 8f253cf commit 48427ae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 1 addition & 2 deletions sphinx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@
__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:
Expand Down
6 changes: 4 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
import shutil
import sys

import docutils
import pytest

import sphinx
from sphinx.testing.path import path

pytest_plugins = 'sphinx.testing.fixtures'
Expand All @@ -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):
Expand Down

0 comments on commit 48427ae

Please sign in to comment.