requires_nbconvert = pytest.mark.skipif(not tool_version("jupyter nbconvert"), reason="nbconvert not found") requires_sphinx_gallery = pytest.mark.skipif( not rst2md, reason="sphinx_gallery is not available") requires_pandoc = pytest.mark.skipif( not is_pandoc_available() or sys.version_info < (3, ), reason="pandoc>=2.7.2 is not available", ) requires_no_pandoc = pytest.mark.skipif(is_pandoc_available(), reason="Pandoc is installed") requires_ir_kernel = pytest.mark.skipif( not any( get_kernel_spec(name).language == "R" for name in find_kernel_specs()), reason="irkernel is not installed", ) requires_myst = pytest.mark.skipif(not is_myst_available(), reason="myst_parser not found") requires_no_myst = pytest.mark.skipif(is_myst_available(), reason="myst is available") skip_on_windows = pytest.mark.skipif(sys.platform.startswith("win"), reason="Issue 489") def list_notebooks(path="ipynb", skip="World"): """All notebooks in the directory notebooks/path, or in the package itself""" if path == "ipynb": return (list_notebooks("ipynb_julia", skip=skip) + list_notebooks("ipynb_py", skip=skip) + list_notebooks("ipynb_R", skip=skip))
requires_sphinx_gallery = pytest.mark.skipif( not rst2md, reason="sphinx_gallery is not available" ) requires_pandoc = pytest.mark.skipif( not is_pandoc_available() or sys.version_info < (3,), reason="pandoc>=2.7.2 is not available", ) requires_no_pandoc = pytest.mark.skipif( is_pandoc_available(), reason="Pandoc is installed" ) requires_ir_kernel = pytest.mark.skipif( not any(get_kernel_spec(name).language == "R" for name in find_kernel_specs()), reason="irkernel is not installed", ) requires_myst = pytest.mark.skipif( not is_myst_available(), reason="myst_parser not found" ) requires_no_myst = pytest.mark.skipif(is_myst_available(), reason="myst is available") requires_pre_commit = pytest.mark.skipif( not tool_version("pre-commit"), reason="pre-commit not found" ) skip_on_windows = pytest.mark.skipif(sys.platform.startswith("win"), reason="Issue 489") def list_notebooks(path="ipynb", skip="World"): """All notebooks in the directory notebooks/path, or in the package itself""" if path == "ipynb": return ( list_notebooks("ipynb_julia", skip=skip) + list_notebooks("ipynb_py", skip=skip)