diff options
author | aa-turner <aa-turner@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2022-11-10 16:54:38 +0000 |
---|---|---|
committer | aa-turner <aa-turner@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2022-11-10 16:54:38 +0000 |
commit | df2f25dc459705bc1781a34fa4b51a8a561e6fcd (patch) | |
tree | 9ec8a263e52383aaead6fe60dbbb3b13e893c463 /docutils/test/conftest.py | |
parent | 7688249672e39bac02e0c9b23101f78bf7de96ce (diff) | |
download | docutils-df2f25dc459705bc1781a34fa4b51a8a561e6fcd.tar.gz |
Add support for ``pytest``
This is the minimal configuration required for the test suite to
pass using the pytest framework. This is part of the test suite
refactoring project.
- Ignore two classes that start with the word "Test"
- Provide the standard test header to pytest
- Update the documentation
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9237 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/test/conftest.py')
-rw-r--r-- | docutils/test/conftest.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/docutils/test/conftest.py b/docutils/test/conftest.py new file mode 100644 index 000000000..bd0ef995a --- /dev/null +++ b/docutils/test/conftest.py @@ -0,0 +1,21 @@ +def pytest_report_header(config):
+ import os
+ import platform
+ import sys
+ import time
+
+ # DocutilsTestSupport must be imported before docutils
+ from . import DocutilsTestSupport # NoQA: F401
+ import docutils
+
+ return '\n'.join((
+ '',
+ f'Testing Docutils {docutils.__version__} '
+ f'with Python {sys.version.split()[0]} '
+ f'on {time.strftime("%Y-%m-%d at %H:%M:%S")}',
+ f'OS: {platform.system()} {platform.release()} {platform.version()} '
+ f'({sys.platform}, {platform.platform()})',
+ f'Working directory: {os.getcwd()}',
+ f'Docutils package: {os.path.dirname(docutils.__file__)}',
+ '',
+ ))
|