debugpy/tests/ptvsd/test_docstrings.py
Pavel Minaev e94980f86c Do not load ptvsd.server (and hence, pydevd) unless the subpackage is loaded explicitly or via a public API entrypoint that requires it.
Move docstrings to top-level package, and update them to reflect the current behavior.

Remove unused code in ptvsd.common.log.

Move sys.path/prefix/site_packages logging into ptvsd.common.log, and log it from adapter and server to the same level of detail as the tests.

Fix injected code snipped for attach-by-PID.

Fix some Unicode issues in adapter and tests.

Refactor Timeline, debug.Session, and start methods.
2019-08-18 11:43:23 -07:00

20 lines
568 B
Python

# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See LICENSE in the project root
# for license information.
from __future__ import absolute_import, print_function, unicode_literals
import inspect
import ptvsd
from ptvsd.common import log
def test_docstrings():
for attr in ptvsd.__all__:
log.info("Checking docstring for ptvsd.{0}", attr)
member = getattr(ptvsd, attr)
doc = inspect.getdoc(member)
for lineno, line in enumerate(doc.split("\n")):
assert len(line) <= 72