Skip to content

Commit

Permalink
Ensure that we can parse all files of the stdlib.
Browse files Browse the repository at this point in the history
  • Loading branch information
tristanlatr committed Sep 25, 2023
1 parent e81b806 commit 8f5dcb2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions docs/tests/test_standard_library_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,11 @@ def test_std_lib_docs() -> None:
elif entry.is_dir() and entry.joinpath('__init__.py').exists(): # Package
assert BASE_DIR.joinpath('Lib.'+entry.name+'.html').exists()

def test_std_lib_logs() -> None:
"""
'Cannot parse file' do not appear too much.
This test expect a run.log file in cpython-output directory
"""
log = (BASE_DIR / 'run.log').read_text()
assert log.count('Cannot parse file') == 4

4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ allowlist_externals =
rm
sh
touch
tee
passenv = *

[testenv:test]
Expand Down Expand Up @@ -169,13 +170,12 @@ commands =
sh -c "cd {toxworkdir}/cpython && git checkout 3.11"
touch {toxworkdir}/cpython/Lib/__init__.py
rm -rf {toxworkdir}/cpython-summary-output
# TODO: Switch to restructuredtext when #261 is fixed.
pydoctor \
--docformat=plaintext \
--project-base-dir={toxworkdir}/cpython \
--html-output={toxworkdir}/cpython-summary-output \
--html-summary-pages \
{toxworkdir}/cpython/Lib
{toxworkdir}/cpython/Lib | tee {toxworkdir}/cpython-summary-output/run.log


[testenv:mypy]
Expand Down

0 comments on commit 8f5dcb2

Please sign in to comment.