Created
September 1, 2020 19:02
-
-
Save phaustin/c98d68ee980ea5619772fb2994ac086d to your computer and use it in GitHub Desktop.
jupyter_book_win_py38 test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> pytest -vv tests | |
============================= test session starts ============================= | |
platform win32 -- Python 3.8.5, pytest-3.10.1, py-1.9.0, pluggy-0.13.1 -- c:\users\phil\minjn20\envs\v0.8_3.8\python.exe | |
cachedir: .pytest_cache | |
JB TEMPDIR: <TEMP> | |
rootdir: C:\Users\Phil\repos\jupyter-book, inifile: tox.ini | |
plugins: cov-2.10.1, datadir-1.3.1, forked-1.3.0, regressions-2.0.1, timeout-1.4.2, xdist-2.1.0 | |
timeout: 100.0s | |
timeout method: thread | |
timeout func_only: False | |
collected 42 items | |
tests/test_build.py::test_version PASSED [ 2%] | |
tests/test_build.py::test_create PASSED [ 4%] | |
tests/test_build.py::test_build_from_template FAILED [ 7%] | |
tests/test_build.py::test_custom_config PASSED [ 9%] | |
tests/test_build.py::test_toc_builds[_toc.yml] PASSED [ 11%] | |
tests/test_build.py::test_toc_builds[_toc_startwithlist.yml] PASSED [ 14%] | |
tests/test_build.py::test_toc_rebuild PASSED [ 16%] | |
tests/test_build.py::test_corrupt_toc[_toc_emptysections.yml-Found an empty section] PASSED [ 19%] | |
tests/test_build.py::test_corrupt_toc[_toc_urlwithouttitle.yml-`url:` link should] PASSED [ 21%] | |
tests/test_build.py::test_corrupt_toc[_toc_url.yml-Rename `url:` to `file:`] PASSED [ 23%] | |
tests/test_build.py::test_corrupt_toc[_toc_wrongkey.yml-Unknown key in `_toc.yml`] PASSED [ 26%] | |
tests/test_build.py::test_build_errors PASSED [ 28%] | |
tests/test_build.py::test_build_docs FAILED [ 30%] | |
tests/test_build.py::test_build_page FAILED [ 33%] | |
tests/test_build.py::test_build_page_nested PASSED [ 35%] | |
tests/test_build.py::test_execution_timeout FAILED [ 38%] | |
tests/test_clean.py::test_clean_book PASSED [ 40%] | |
tests/test_clean.py::test_clean_html PASSED [ 42%] | |
tests/test_clean.py::test_clean_latex PASSED [ 45%] | |
tests/test_clean.py::test_clean_html_latex PASSED [ 47%] | |
tests/test_config.py::test_get_final_config[empty] PASSED [ 50%] | |
tests/test_config.py::test_get_final_config[title] PASSED [ 52%] | |
tests/test_config.py::test_get_final_config[html.extra_footer] PASSED [ 54%] | |
tests/test_config.py::test_get_final_config[execute.method] PASSED [ 57%] | |
tests/test_config.py::test_get_final_config[extended_syntax] PASSED [ 59%] | |
tests/test_config.py::test_get_final_config[latex_doc] PASSED [ 61%] | |
tests/test_config.py::test_get_final_config[launch_buttons] PASSED [ 64%] | |
tests/test_config.py::test_get_final_config[repository] PASSED [ 66%] | |
tests/test_config.py::test_get_final_config[exclude_patterns] PASSED [ 69%] | |
tests/test_config.py::test_get_final_config[sphinx] PASSED [ 71%] | |
tests/test_config.py::test_validate_yaml PASSED [ 73%] | |
tests/test_config.py::test_config_sphinx_command PASSED [ 76%] | |
tests/test_pdf.py::test_pdfhtml FAILED [ 78%] | |
tests/test_pdf.py::test_pdflatex FAILED [ 80%] | |
tests/test_toc.py::test_toc_basic PASSED [ 83%] | |
tests/test_toc.py::test_toc_fail PASSED [ 85%] | |
tests/test_toc.py::test_toc_add_titles PASSED [ 88%] | |
tests/test_toc.py::test_toc_numbered PASSED [ 90%] | |
tests/test_tocdirective.py::test_toc_startwithlist PASSED [ 92%] | |
tests/test_tocdirective.py::test_toc_parts PASSED [ 95%] | |
tests/test_tocdirective.py::test_toc_urllink SKIPPED [ 97%] | |
tests/test_utils.py::test_myst_init PASSED [100%] | |
================================== FAILURES =================================== | |
__________________________ test_build_from_template ___________________________ | |
temp_with_override = WindowsPath('C:/Users/Phil/AppData/Local/Temp/pytest-of-phil/pytest-22/test_build_from_template0') | |
cli = <click.testing.CliRunner object at 0x000001CE7805FE80> | |
def test_build_from_template(temp_with_override, cli): | |
"""Test building the book template and a few test configs.""" | |
# Create the book from the template | |
book = temp_with_override / "new_book" | |
_ = cli.invoke(commands.create, book.as_posix()) | |
build_result = cli.invoke(commands.build, book.as_posix()) | |
> assert build_result.exit_code == 0, build_result.output | |
E AssertionError: Running Jupyter-Book v0.8.0 | |
E Source Folder: C:\Users\Phil\AppData\Local\Temp\pytest-of-phil\pytest-22\test_build_from_template0\new_book | |
E Config Path: C:\Users\Phil\AppData\Local\Temp\pytest-of-phil\pytest-22\test_build_from_template0\new_book\_config.yml | |
E Output Path: C:\Users\Phil\AppData\Local\Temp\pytest-of-phil\pytest-22\test_build_from_template0\new_book\_build\html | |
E Running Sphinx v3.2.1 | |
E making output directory... done | |
E myst v0.12.8: MdParserConfig(renderer='sphinx', commonmark_only=False, dmath_enable=True, dmath_allow_labels=True, dmath_allow_space=True, dmath_allow_digits=True, amsmath_enable=False, deflist_enable=False, update_mathjax=True, admonition_enable=False, figure_enable=False, disable_syntax=[], html_img_enable=False, url_schemes=['mailto', 'http', 'https']) | |
E building [mo]: targets for 0 po files that are out of date | |
E building [html]: targets for 4 source files that are out of date | |
E updating environment: [new config] 4 added, 0 changed, 0 removed | |
checking for C:\Users\Phil\AppData\Local\Temp\pytest-of-phil\pytest-22\test_build_from_template0\new_book\references.bib in bibtex cache... not found | |
E parsing bibtex file C:\Users\Phil\AppData\Local\Temp\pytest-of-phil\pytest-22\test_build_from_template0\new_book\references.bib... parsed 5 entries | |
Executing: notebooks in: C:\Users\Phil\AppData\Local\Temp\pytest-of-phil\pytest-22\test_build_from_template0\new_book | |
E | |
E Exception occurred: | |
E File "c:\users\phil\minjn20\envs\v0.8_3.8\lib\site-packages\jupyter_core\paths.py", line 361, in win32_restrict_file_to_user | |
E import win32api | |
E ImportError: DLL load failed while importing win32api: The specified module could not be found. | |
E The full traceback has been saved in C:\Users\Phil\AppData\Local\Temp\sphinx-err-vyey9jcq.log, if you want to report the issue to the developers. | |
E Please also report this if it was a user error, so that a better error message can be provided next time. | |
E A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks! | |
E | |
E assert 1 == 0 | |
E + where 1 = <Result RuntimeError('\n\x1b[91m===============================================================================\x1b[0m...e for the cause.\n\n\x1b[91m===============================================================================\x1b[0m\n')>.exit_code | |
tests\test_build.py:32: AssertionError | |
_______________________________ test_build_docs _______________________________ | |
docs = WindowsPath('C:/Users/Phil/AppData/Local/Temp/pytest-of-phil/pytest-22/test_build_docs0/docs') | |
cli = <click.testing.CliRunner object at 0x000001CE78F41B80> | |
def test_build_docs(docs, cli): | |
"""Test building the documentation book.""" | |
html = docs.joinpath("_build", "html") | |
result = cli.invoke(commands.build, [docs.as_posix()]) | |
> assert result.exit_code == 0 | |
E assert 1 == 0 | |
E + where 1 = <Result SystemExit(1)>.exit_code | |
tests\test_build.py:149: AssertionError | |
_______________________________ test_build_page _______________________________ | |
pages = WindowsPath('C:/Users/Phil/AppData/Local/Temp/pytest-of-phil/pytest-22/test_build_page0/pages') | |
cli = <click.testing.CliRunner object at 0x000001CE7B862430> | |
def test_build_page(pages, cli): | |
"""Test building a page.""" | |
page = pages.joinpath("single_page.ipynb") | |
html = pages.joinpath("_build", "_page", "single_page", "html") | |
index = html.joinpath("index.html") | |
result = cli.invoke(commands.build, [page.as_posix()]) | |
> assert result.exit_code == 0 | |
E AssertionError: assert 1 == 0 | |
E + where 1 = <Result RuntimeError('\n\x1b[91m===============================================================================\x1b[0m...e for the cause.\n\n\x1b[91m===============================================================================\x1b[0m\n')>.exit_code | |
tests\test_build.py:161: AssertionError | |
___________________________ test_execution_timeout ____________________________ | |
pages = WindowsPath('C:/Users/Phil/AppData/Local/Temp/pytest-of-phil/pytest-22/test_execution_timeout0/pages') | |
build_resources = (WindowsPath('C:/Users/Phil/AppData/Local/Temp/pytest-of-phil/pytest-22/test_execution_timeout0/books'), WindowsPath('C:/Users/Phil/AppData/Local/Temp/pytest-of-phil/pytest-22/test_execution_timeout0/books/toc')) | |
cli = <click.testing.CliRunner object at 0x000001CE79D4CD30> | |
@pytest.mark.skipif(sphinx.version_info[0] == 2, reason="randomly fails on CI") | |
def test_execution_timeout(pages, build_resources, cli): | |
"""Testing timeout execution for a page.""" | |
books, _ = build_resources | |
path_page = pages.joinpath("complex_outputs_unrun.ipynb") | |
path_c = books.joinpath("config", "_config_timeout.yml") | |
path_html = pages.joinpath("_build", "_page", "complex_outputs_unrun", "html") | |
result = cli.invoke( | |
commands.build, [path_page.as_posix(), "--config", path_c.as_posix()] | |
) | |
> assert "Execution Failed" in result.stdout | |
E AssertionError: assert 'Execution Failed' in 'Running Jupyter-Book v0.8.0\nSource Folder: C:\\Users\\Phil\\AppData\\Local\\Temp\\pytest-of-phil\\pytest-22\\test_ex...uts_unrun.html\n\n\n\x1b[92m===============================================================================\x1b[0m\n\n' | |
E + where 'Running Jupyter-Book v0.8.0\nSource Folder: C:\\Users\\Phil\\AppData\\Local\\Temp\\pytest-of-phil\\pytest-22\\test_ex...uts_unrun.html\n\n\n\x1b[92m===============================================================================\x1b[0m\n\n' = <Result okay>.stdout | |
tests\test_build.py:191: AssertionError | |
________________________________ test_pdfhtml _________________________________ | |
cli = <click.testing.CliRunner object at 0x000001CE7BB4BD90> | |
temp_with_override = WindowsPath('C:/Users/Phil/AppData/Local/Temp/pytest-of-phil/pytest-22/test_pdfhtml0') | |
@pytest.mark.requires_chrome | |
def test_pdfhtml(cli: CliRunner, temp_with_override: Path): | |
path_output = temp_with_override.absolute() | |
# test for build | |
path_template = path_tests.parent.joinpath("jupyter_book", "book_template") | |
cmd = f"{path_template} --path-output {path_output} --builder pdfhtml" | |
result = cli.invoke(build, cmd.split()) | |
> assert result.exit_code == 0 | |
E AssertionError: assert 1 == 0 | |
E + where 1 = <Result RuntimeError('\n\x1b[91m===============================================================================\x1b[0m...e for the cause.\n\n\x1b[91m===============================================================================\x1b[0m\n')>.exit_code | |
tests\test_pdf.py:21: AssertionError | |
________________________________ test_pdflatex ________________________________ | |
cli = <click.testing.CliRunner object at 0x000001CE7BB31040> | |
temp_with_override = WindowsPath('C:/Users/Phil/AppData/Local/Temp/pytest-of-phil/pytest-22/test_pdflatex0') | |
@pytest.mark.requires_tex | |
def test_pdflatex(cli: CliRunner, temp_with_override: Path): | |
path_output = temp_with_override.absolute() | |
# test for build | |
path_template = path_tests.parent.joinpath("jupyter_book", "book_template") | |
cmd = f"{path_template} --path-output {path_output} --builder pdflatex" | |
result = cli.invoke(build, cmd.split()) | |
> assert result.exit_code == 0 | |
E AssertionError: assert 1 == 0 | |
E + where 1 = <Result RuntimeError('\n\x1b[91m===============================================================================\x1b[0m...e for the cause.\n\n\x1b[91m===============================================================================\x1b[0m\n')>.exit_code | |
tests\test_pdf.py:49: AssertionError | |
============================== warnings summary =============================== | |
tests/test_build.py::test_build_from_template | |
C:\Users\Phil\repos\jupyter-book\jupyter_book\config.py:49: DeprecationWarning: The metaschema specified by $schema was not found. Using the latest draft to validate, but this will raise an error in the future. | |
validator_cls = jsonschema.validators.validator_for(schema) | |
c:\users\phil\minjn20\envs\v0.8_3.8\lib\site-packages\oset\pyoset.py:16: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.9 it will stop working | |
from collections import MutableSet | |
-- Docs: https://docs.pytest.org/en/latest/warnings.html | |
========= 6 failed, 35 passed, 1 skipped, 2 warnings in 57.67 seconds ========= | |
(v0.8_3.8):repos/jupyter-book | |
> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment