PHP 8.0.30
Preview: test_docs.py Size: 1.04 KB
//opt/alt/python37/lib/python3.7/site-packages/bs4/tests/test_docs.py

"Test harness for doctests."

# pylint: disable-msg=E0611,W0142

__metaclass__ = type
__all__ = [
    'additional_tests',
    ]

import atexit
import doctest
import os
#from pkg_resources import (
#    resource_filename, resource_exists, resource_listdir, cleanup_resources)
import unittest

DOCTEST_FLAGS = (
    doctest.ELLIPSIS |
    doctest.NORMALIZE_WHITESPACE |
    doctest.REPORT_NDIFF)


# def additional_tests():
#     "Run the doc tests (README.txt and docs/*, if any exist)"
#     doctest_files = [
#         os.path.abspath(resource_filename('bs4', 'README.txt'))]
#     if resource_exists('bs4', 'docs'):
#         for name in resource_listdir('bs4', 'docs'):
#             if name.endswith('.txt'):
#                 doctest_files.append(
#                     os.path.abspath(
#                         resource_filename('bs4', 'docs/%s' % name)))
#     kwargs = dict(module_relative=False, optionflags=DOCTEST_FLAGS)
#     atexit.register(cleanup_resources)
#     return unittest.TestSuite((
#         doctest.DocFileSuite(*doctest_files, **kwargs)))

Directory Contents

Dirs: 1 × Files: 8

Name Size Perms Modified Actions
- drwxr-xr-x 2021-10-11 07:56:04
Edit Download
5.45 KB lrw-r--r-- 2014-12-07 14:24:22
Edit Download
1.04 KB lrw-r--r-- 2012-05-03 14:09:26
Edit Download
3.82 KB lrw-r--r-- 2021-07-07 22:45:56
Edit Download
1002 B lrw-r--r-- 2015-06-28 19:53:42
Edit Download
2.32 KB lrw-r--r-- 2021-07-07 22:45:56
Edit Download
19.85 KB lrw-r--r-- 2021-07-07 22:46:02
Edit Download
76.20 KB lrw-r--r-- 2021-07-07 22:45:58
Edit Download
27 B lrw-r--r-- 2011-08-11 13:28:08
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).