mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
tests: Use 'pytest_report_header'
This is the recommended way to print extra headers [1]. [1] https://docs.pytest.org/en/latest/example/simple.html#adding-info-to-test-report-header Signed-off-by: Stephen Finucane <stephen@that.guru>
This commit is contained in:
parent
9348c4bea1
commit
c33ecd1f8f
@ -26,3 +26,8 @@ if sys.version_info < (3, 5):
|
||||
@pytest.fixture(scope='session')
|
||||
def rootdir():
|
||||
return path(os.path.dirname(__file__) or '.').abspath() / 'roots'
|
||||
|
||||
|
||||
def pytest_report_header(config):
|
||||
return 'Running Sphinx test suite (with Python %s)...' % (
|
||||
sys.version.split()[0])
|
||||
|
@ -39,8 +39,5 @@ if os.path.exists(tempdir):
|
||||
shutil.rmtree(tempdir)
|
||||
os.makedirs(tempdir)
|
||||
|
||||
print('Running Sphinx test suite (with Python %s)...' % sys.version.split()[0])
|
||||
sys.stdout.flush()
|
||||
|
||||
import pytest # NOQA
|
||||
sys.exit(pytest.main(sys.argv[1:]))
|
||||
|
Loading…
Reference in New Issue
Block a user