Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.6 + master (1762fd81): pytest is failing #23

Open
kloczek opened this issue May 22, 2022 · 6 comments
Open

0.6 + master (1762fd81): pytest is failing #23

kloczek opened this issue May 22, 2022 · 6 comments

Comments

@kloczek
Copy link

kloczek commented May 22, 2022

I'm trying to package your module as an rpm package. So I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.

  • python3 -sBm build -w --no-isolation
  • because I'm calling build with --no-isolation I'm using during all processes only locally installed modules
  • install .whl file in </install/prefix>
  • run pytest with PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>

Here is pytest output:

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-nb2plots-0.6-21.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-nb2plots-0.6-21.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/nb2plots-0.6
collected 110 items / 2 errors

================================================================================== ERRORS ==================================================================================
__________________________________________________________ ERROR collecting nb2plots/tests/test_from_notebook.py ___________________________________________________________
/usr/lib/python3.8/site-packages/IPython/utils/shimmodule.py:92: in __getattr__
    return import_item(name)
/usr/lib/python3.8/site-packages/IPython/utils/importstring.py:31: in import_item
    module = __import__(package, fromlist=[obj])
E   ModuleNotFoundError: No module named 'nbconvert'

During handling of the above exception, another exception occurred:
nb2plots/tests/test_from_notebook.py:7: in <module>
    from ..from_notebook import (convert_nb, convert_nb_fname, to_doctests,
nb2plots/from_notebook.py:54: in <module>
    nbconvert.RSTExporter().template_file)})
/usr/lib/python3.8/site-packages/IPython/utils/shimmodule.py:94: in __getattr__
    raise AttributeError(key)
E   AttributeError: RSTExporter
____________________________________________________________ ERROR collecting nb2plots/tests/test_regression.py ____________________________________________________________
/usr/lib/python3.8/site-packages/IPython/utils/shimmodule.py:92: in __getattr__
    return import_item(name)
/usr/lib/python3.8/site-packages/IPython/utils/importstring.py:31: in import_item
    module = __import__(package, fromlist=[obj])
E   ModuleNotFoundError: No module named 'nbconvert'

During handling of the above exception, another exception occurred:
nb2plots/tests/test_regression.py:6: in <module>
    from nb2plots.from_notebook import convert_nb_fname
nb2plots/from_notebook.py:54: in <module>
    nbconvert.RSTExporter().template_file)})
/usr/lib/python3.8/site-packages/IPython/utils/shimmodule.py:94: in __getattr__
    raise AttributeError(key)
E   AttributeError: RSTExporter
============================================================================= warnings summary =============================================================================
../../../../../usr/lib/python3.8/site-packages/IPython/nbconvert.py:12
  /usr/lib/python3.8/site-packages/IPython/nbconvert.py:12: ShimWarning: The `IPython.nbconvert` package has been deprecated since IPython 4.0. You should import from nbconvert instead.
    warn("The `IPython.nbconvert` package has been deprecated since IPython 4.0. "

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
========================================================================= short test summary info ==========================================================================
ERROR nb2plots/tests/test_from_notebook.py - AttributeError: RSTExporter
ERROR nb2plots/tests/test_regression.py - AttributeError: RSTExporter
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
======================================================================= 1 warning, 2 errors in 1.61s =======================================================================
@kloczek
Copy link
Author

kloczek commented May 22, 2022

Sorry nbconvert was missing. After add that module to build env,
With that module pytest was able collect units and start testing however many units are failing and there are some warnings

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-nb2plots-0.6-21.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-nb2plots-0.6-21.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/nb2plots-0.6
collected 117 items

nb2plots/tests/test_builders.py EEEE....EE                                                                                                                           [  8%]
nb2plots/tests/test_codelinks.py FEE                                                                                                                                 [ 11%]
nb2plots/tests/test_config.py .                                                                                                                                      [ 11%]
nb2plots/tests/test_converters.py .                                                                                                                                  [ 12%]
nb2plots/tests/test_doctree2md.py .....                                                                                                                              [ 17%]
nb2plots/tests/test_doctree2nb.py .F......                                                                                                                           [ 23%]
nb2plots/tests/test_doctree2py.py ..                                                                                                                                 [ 25%]
nb2plots/tests/test_from_notebook.py ......                                                                                                                          [ 30%]
nb2plots/tests/test_mpl_interactive.py .                                                                                                                             [ 31%]
nb2plots/tests/test_nbplots.py ......................................EE.......                                                                                       [ 71%]
nb2plots/tests/test_proj1.py EEE..                                                                                                                                   [ 76%]
nb2plots/tests/test_regression.py .                                                                                                                                  [ 76%]
nb2plots/tests/test_runroles.py ..F....EE.                                                                                                                           [ 85%]
nb2plots/tests/test_scripts.py .....                                                                                                                                 [ 89%]
nb2plots/tests/test_sphinx2md.py ..                                                                                                                                  [ 91%]
nb2plots/tests/test_strdiff.py .                                                                                                                                     [ 92%]
nb2plots/tests/test_timeout.py EE...EEEE                                                                                                                             [100%]

================================================================================== ERRORS ==================================================================================
___________________________________________________________ ERROR at setup of TestMarkdownBuild.test_build_error ___________________________________________________________

cls = <class 'nb2plots.tests.test_builders.TestMarkdownBuild'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
            raise e
>       cls.build_source()

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:223:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'nb2plots.tests.test_builders.TestMarkdownBuild'>

    @classmethod
    def build_source(cls):
        try:  # Catch exceptions during sphinx build
            cls.build_app.build(False, [])
            if cls.build_app.statuscode != 0:
                cls.build_error = "Unknown error"
        except Exception as e:  # Exceptions during sphinx build
            cls.build_error = e
        # We will later check if a page build that should error, did error
        if cls.build_error is None or cls.should_error:
            return
        # An unexpected error - delete temp dir and report.
        shutil.rmtree(cls.build_path)
>       raise RuntimeError('page build failed with build error {}'
                           .format(cls.build_error))
E       RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7f7305d41700> for event 'build-finished' threw an exception (exception: No such kernel named python3)

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:254: RuntimeError
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Running Sphinx v4.5.0
making output directory... done
building [mo]: targets for 0 po files that are out of date
building [markdown]: targets for 4 source files that are out of date
updating environment: [new config] 4 added, 0 changed, 0 removed
reading sources... [100%] subdir2/c_page
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] subdir2/c_page
build succeeded.

The text files are in ../../../../../tmp/tmpx1u8gqmg/markdown.
---------------------------------------------------------------------------- Captured log setup ----------------------------------------------------------------------------
WARNING  traitlets:kernelspec.py:293 Kernelspec name python3 cannot be found!
ERROR    traitlets:manager.py:82 No such kernel named python3
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 75, in wrapper
    out = await method(self, *args, **kwargs)
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 383, in _async_start_kernel
    kernel_cmd, kw = await ensure_async(self.pre_start_kernel(**kw))
  File "/usr/lib/python3.8/site-packages/jupyter_client/utils.py", line 38, in ensure_async
    return await obj
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 346, in _async_pre_start_kernel
    self.kernel_spec,
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 176, in kernel_spec
    self._kernel_spec = self.kernel_spec_manager.get_kernel_spec(self.kernel_name)
  File "/usr/lib/python3.8/site-packages/jupyter_client/kernelspec.py", line 294, in get_kernel_spec
    raise NoSuchKernel(kernel_name)
jupyter_client.kernelspec.NoSuchKernel: No such kernel named python3
_____________________________________________________________ ERROR at setup of TestMarkdownBuild.test_output ______________________________________________________________

cls = <class 'nb2plots.tests.test_builders.TestMarkdownBuild'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
            raise e
>       cls.build_source()

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:223:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'nb2plots.tests.test_builders.TestMarkdownBuild'>

    @classmethod
    def build_source(cls):
        try:  # Catch exceptions during sphinx build
            cls.build_app.build(False, [])
            if cls.build_app.statuscode != 0:
                cls.build_error = "Unknown error"
        except Exception as e:  # Exceptions during sphinx build
            cls.build_error = e
        # We will later check if a page build that should error, did error
        if cls.build_error is None or cls.should_error:
            return
        # An unexpected error - delete temp dir and report.
        shutil.rmtree(cls.build_path)
>       raise RuntimeError('page build failed with build error {}'
                           .format(cls.build_error))
E       RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7f7305d41700> for event 'build-finished' threw an exception (exception: No such kernel named python3)

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:254: RuntimeError
________________________________________________________ ERROR at setup of TestBasedMarkdownBuild.test_build_error _________________________________________________________

cls = <class 'nb2plots.tests.test_builders.TestBasedMarkdownBuild'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
            raise e
>       cls.build_source()

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:223:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'nb2plots.tests.test_builders.TestBasedMarkdownBuild'>

    @classmethod
    def build_source(cls):
        try:  # Catch exceptions during sphinx build
            cls.build_app.build(False, [])
            if cls.build_app.statuscode != 0:
                cls.build_error = "Unknown error"
        except Exception as e:  # Exceptions during sphinx build
            cls.build_error = e
        # We will later check if a page build that should error, did error
        if cls.build_error is None or cls.should_error:
            return
        # An unexpected error - delete temp dir and report.
        shutil.rmtree(cls.build_path)
>       raise RuntimeError('page build failed with build error {}'
                           .format(cls.build_error))
E       RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7f7305d41700> for event 'build-finished' threw an exception (exception: No such kernel named python3)

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:254: RuntimeError
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Running Sphinx v4.5.0
making output directory... done
building [mo]: targets for 0 po files that are out of date
building [markdown]: targets for 4 source files that are out of date
updating environment: [new config] 4 added, 0 changed, 0 removed
reading sources... [100%] subdir2/c_page
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] subdir2/c_page
build succeeded.

The text files are in ../../../../../tmp/tmp3efgx73a/markdown.
---------------------------------------------------------------------------- Captured log setup ----------------------------------------------------------------------------
WARNING  traitlets:kernelspec.py:293 Kernelspec name python3 cannot be found!
ERROR    traitlets:manager.py:82 No such kernel named python3
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 75, in wrapper
    out = await method(self, *args, **kwargs)
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 383, in _async_start_kernel
    kernel_cmd, kw = await ensure_async(self.pre_start_kernel(**kw))
  File "/usr/lib/python3.8/site-packages/jupyter_client/utils.py", line 38, in ensure_async
    return await obj
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 346, in _async_pre_start_kernel
    self.kernel_spec,
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 176, in kernel_spec
    self._kernel_spec = self.kernel_spec_manager.get_kernel_spec(self.kernel_name)
  File "/usr/lib/python3.8/site-packages/jupyter_client/kernelspec.py", line 294, in get_kernel_spec
    raise NoSuchKernel(kernel_name)
jupyter_client.kernelspec.NoSuchKernel: No such kernel named python3
___________________________________________________________ ERROR at setup of TestBasedMarkdownBuild.test_output ___________________________________________________________

cls = <class 'nb2plots.tests.test_builders.TestBasedMarkdownBuild'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
            raise e
>       cls.build_source()

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:223:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'nb2plots.tests.test_builders.TestBasedMarkdownBuild'>

    @classmethod
    def build_source(cls):
        try:  # Catch exceptions during sphinx build
            cls.build_app.build(False, [])
            if cls.build_app.statuscode != 0:
                cls.build_error = "Unknown error"
        except Exception as e:  # Exceptions during sphinx build
            cls.build_error = e
        # We will later check if a page build that should error, did error
        if cls.build_error is None or cls.should_error:
            return
        # An unexpected error - delete temp dir and report.
        shutil.rmtree(cls.build_path)
>       raise RuntimeError('page build failed with build error {}'
                           .format(cls.build_error))
E       RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7f7305d41700> for event 'build-finished' threw an exception (exception: No such kernel named python3)

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:254: RuntimeError
____________________________________________________________ ERROR at setup of TestLatexBuild.test_build_error _____________________________________________________________

cls = <class 'nb2plots.tests.test_builders.TestLatexBuild'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
            raise e
>       cls.build_source()

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:223:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'nb2plots.tests.test_builders.TestLatexBuild'>

    @classmethod
    def build_source(cls):
        try:  # Catch exceptions during sphinx build
            cls.build_app.build(False, [])
            if cls.build_app.statuscode != 0:
                cls.build_error = "Unknown error"
        except Exception as e:  # Exceptions during sphinx build
            cls.build_error = e
        # We will later check if a page build that should error, did error
        if cls.build_error is None or cls.should_error:
            return
        # An unexpected error - delete temp dir and report.
        shutil.rmtree(cls.build_path)
>       raise RuntimeError('page build failed with build error {}'
                           .format(cls.build_error))
E       RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7f7305d41700> for event 'build-finished' threw an exception (exception: No such kernel named python3)

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:254: RuntimeError
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Running Sphinx v4.5.0
making output directory... done
building [mo]: targets for 0 po files that are out of date
building [latex]: all documents
updating environment: [new config] 2 added, 0 changed, 0 removed
reading sources... [100%] foo/a_page
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
processing python.tex... contents foo/a_page
resolving references...
done
writing... done
copying TeX support files... copying TeX support files...
done
build succeeded.

The LaTeX files are in ../../../../../tmp/tmp9ye36mhw/latex.
Run 'make' in that directory to run these through (pdf)latex
(use `make latexpdf' here to do that automatically).
---------------------------------------------------------------------------- Captured log setup ----------------------------------------------------------------------------
WARNING  traitlets:kernelspec.py:293 Kernelspec name python3 cannot be found!
ERROR    traitlets:manager.py:82 No such kernel named python3
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 75, in wrapper
    out = await method(self, *args, **kwargs)
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 383, in _async_start_kernel
    kernel_cmd, kw = await ensure_async(self.pre_start_kernel(**kw))
  File "/usr/lib/python3.8/site-packages/jupyter_client/utils.py", line 38, in ensure_async
    return await obj
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 346, in _async_pre_start_kernel
    self.kernel_spec,
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 176, in kernel_spec
    self._kernel_spec = self.kernel_spec_manager.get_kernel_spec(self.kernel_name)
  File "/usr/lib/python3.8/site-packages/jupyter_client/kernelspec.py", line 294, in get_kernel_spec
    raise NoSuchKernel(kernel_name)
jupyter_client.kernelspec.NoSuchKernel: No such kernel named python3
_______________________________________________________________ ERROR at setup of TestLatexBuild.test_output _______________________________________________________________

cls = <class 'nb2plots.tests.test_builders.TestLatexBuild'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
            raise e
>       cls.build_source()

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:223:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'nb2plots.tests.test_builders.TestLatexBuild'>

    @classmethod
    def build_source(cls):
        try:  # Catch exceptions during sphinx build
            cls.build_app.build(False, [])
            if cls.build_app.statuscode != 0:
                cls.build_error = "Unknown error"
        except Exception as e:  # Exceptions during sphinx build
            cls.build_error = e
        # We will later check if a page build that should error, did error
        if cls.build_error is None or cls.should_error:
            return
        # An unexpected error - delete temp dir and report.
        shutil.rmtree(cls.build_path)
>       raise RuntimeError('page build failed with build error {}'
                           .format(cls.build_error))
E       RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7f7305d41700> for event 'build-finished' threw an exception (exception: No such kernel named python3)

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:254: RuntimeError
__________________________________________________________ ERROR at setup of TestSubdirCodeLinks.test_build_error __________________________________________________________

cls = <class 'nb2plots.tests.test_codelinks.TestSubdirCodeLinks'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
            raise e
>       cls.build_source()

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:223:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'nb2plots.tests.test_codelinks.TestSubdirCodeLinks'>

    @classmethod
    def build_source(cls):
        try:  # Catch exceptions during sphinx build
            cls.build_app.build(False, [])
            if cls.build_app.statuscode != 0:
                cls.build_error = "Unknown error"
        except Exception as e:  # Exceptions during sphinx build
            cls.build_error = e
        # We will later check if a page build that should error, did error
        if cls.build_error is None or cls.should_error:
            return
        # An unexpected error - delete temp dir and report.
        shutil.rmtree(cls.build_path)
>       raise RuntimeError('page build failed with build error {}'
                           .format(cls.build_error))
E       RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7f7305d41700> for event 'build-finished' threw an exception (exception: No such kernel named python3)

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:254: RuntimeError
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Running Sphinx v4.5.0
making output directory... done
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 2 source files that are out of date
updating environment: [new config] 2 added, 0 changed, 0 removed
reading sources... [100%] foo/a_page
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] foo/a_page
generating indices... genindex done
writing additional pages... search done
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.

The HTML pages are in ../../../../../tmp/tmplfm71zhp/html.
---------------------------------------------------------------------------- Captured log setup ----------------------------------------------------------------------------
WARNING  traitlets:kernelspec.py:293 Kernelspec name python3 cannot be found!
ERROR    traitlets:manager.py:82 No such kernel named python3
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 75, in wrapper
    out = await method(self, *args, **kwargs)
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 383, in _async_start_kernel
    kernel_cmd, kw = await ensure_async(self.pre_start_kernel(**kw))
  File "/usr/lib/python3.8/site-packages/jupyter_client/utils.py", line 38, in ensure_async
    return await obj
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 346, in _async_pre_start_kernel
    self.kernel_spec,
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 176, in kernel_spec
    self._kernel_spec = self.kernel_spec_manager.get_kernel_spec(self.kernel_name)
  File "/usr/lib/python3.8/site-packages/jupyter_client/kernelspec.py", line 294, in get_kernel_spec
    raise NoSuchKernel(kernel_name)
jupyter_client.kernelspec.NoSuchKernel: No such kernel named python3
____________________________________________________________ ERROR at setup of TestSubdirCodeLinks.test_output _____________________________________________________________

cls = <class 'nb2plots.tests.test_codelinks.TestSubdirCodeLinks'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
            raise e
>       cls.build_source()

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:223:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'nb2plots.tests.test_codelinks.TestSubdirCodeLinks'>

    @classmethod
    def build_source(cls):
        try:  # Catch exceptions during sphinx build
            cls.build_app.build(False, [])
            if cls.build_app.statuscode != 0:
                cls.build_error = "Unknown error"
        except Exception as e:  # Exceptions during sphinx build
            cls.build_error = e
        # We will later check if a page build that should error, did error
        if cls.build_error is None or cls.should_error:
            return
        # An unexpected error - delete temp dir and report.
        shutil.rmtree(cls.build_path)
>       raise RuntimeError('page build failed with build error {}'
                           .format(cls.build_error))
E       RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7f7305d41700> for event 'build-finished' threw an exception (exception: No such kernel named python3)

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:254: RuntimeError
___________________________________________________________ ERROR at setup of TestClearNotebook.test_build_error ___________________________________________________________

cls = <class 'nb2plots.tests.test_nbplots.TestClearNotebook'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
            raise e
>       cls.build_source()

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:223:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'nb2plots.tests.test_nbplots.TestClearNotebook'>

    @classmethod
    def build_source(cls):
        try:  # Catch exceptions during sphinx build
            cls.build_app.build(False, [])
            if cls.build_app.statuscode != 0:
                cls.build_error = "Unknown error"
        except Exception as e:  # Exceptions during sphinx build
            cls.build_error = e
        # We will later check if a page build that should error, did error
        if cls.build_error is None or cls.should_error:
            return
        # An unexpected error - delete temp dir and report.
        shutil.rmtree(cls.build_path)
>       raise RuntimeError('page build failed with build error {}'
                           .format(cls.build_error))
E       RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7f7305d41700> for event 'build-finished' threw an exception (exception: No such kernel named python3)

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:254: RuntimeError
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Running Sphinx v4.5.0
making output directory... done
building [mo]: targets for 0 po files that are out of date
building [text]: targets for 2 source files that are out of date
updating environment: [new config] 2 added, 0 changed, 0 removed
reading sources... [100%] contents
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] contents
build succeeded.

The text files are in ../../../../../tmp/tmpv828o4ai/text.
---------------------------------------------------------------------------- Captured log setup ----------------------------------------------------------------------------
WARNING  traitlets:kernelspec.py:293 Kernelspec name python3 cannot be found!
ERROR    traitlets:manager.py:82 No such kernel named python3
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 75, in wrapper
    out = await method(self, *args, **kwargs)
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 383, in _async_start_kernel
    kernel_cmd, kw = await ensure_async(self.pre_start_kernel(**kw))
  File "/usr/lib/python3.8/site-packages/jupyter_client/utils.py", line 38, in ensure_async
    return await obj
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 346, in _async_pre_start_kernel
    self.kernel_spec,
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 176, in kernel_spec
    self._kernel_spec = self.kernel_spec_manager.get_kernel_spec(self.kernel_name)
  File "/usr/lib/python3.8/site-packages/jupyter_client/kernelspec.py", line 294, in get_kernel_spec
    raise NoSuchKernel(kernel_name)
jupyter_client.kernelspec.NoSuchKernel: No such kernel named python3
______________________________________________________________ ERROR at setup of TestClearNotebook.test_pages ______________________________________________________________

cls = <class 'nb2plots.tests.test_nbplots.TestClearNotebook'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
            raise e
>       cls.build_source()

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:223:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'nb2plots.tests.test_nbplots.TestClearNotebook'>

    @classmethod
    def build_source(cls):
        try:  # Catch exceptions during sphinx build
            cls.build_app.build(False, [])
            if cls.build_app.statuscode != 0:
                cls.build_error = "Unknown error"
        except Exception as e:  # Exceptions during sphinx build
            cls.build_error = e
        # We will later check if a page build that should error, did error
        if cls.build_error is None or cls.should_error:
            return
        # An unexpected error - delete temp dir and report.
        shutil.rmtree(cls.build_path)
>       raise RuntimeError('page build failed with build error {}'
                           .format(cls.build_error))
E       RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7f7305d41700> for event 'build-finished' threw an exception (exception: No such kernel named python3)

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:254: RuntimeError
_______________________________________________________________ ERROR at setup of TestProj1.test_build_error _______________________________________________________________

cls = <class 'nb2plots.tests.test_proj1.TestProj1'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
            raise e
>       cls.build_source()

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:223:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'nb2plots.tests.test_proj1.TestProj1'>

    @classmethod
    def build_source(cls):
        try:  # Catch exceptions during sphinx build
            cls.build_app.build(False, [])
            if cls.build_app.statuscode != 0:
                cls.build_error = "Unknown error"
        except Exception as e:  # Exceptions during sphinx build
            cls.build_error = e
        # We will later check if a page build that should error, did error
        if cls.build_error is None or cls.should_error:
            return
        # An unexpected error - delete temp dir and report.
        shutil.rmtree(cls.build_path)
>       raise RuntimeError('page build failed with build error {}'
                           .format(cls.build_error))
E       RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7f7305d41700> for event 'build-finished' threw an exception (exception: No such kernel named python3)

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:254: RuntimeError
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Running Sphinx v4.5.0
making output directory... done
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 2 source files that are out of date
updating environment: [new config] 2 added, 0 changed, 0 removed
reading sources... [100%] index
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] index
generating indices... genindex done
writing additional pages... search done
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.

The HTML pages are in ../../../../../tmp/tmpi6kr898l/html.
---------------------------------------------------------------------------- Captured log setup ----------------------------------------------------------------------------
WARNING  traitlets:kernelspec.py:293 Kernelspec name python3 cannot be found!
ERROR    traitlets:manager.py:82 No such kernel named python3
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 75, in wrapper
    out = await method(self, *args, **kwargs)
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 383, in _async_start_kernel
    kernel_cmd, kw = await ensure_async(self.pre_start_kernel(**kw))
  File "/usr/lib/python3.8/site-packages/jupyter_client/utils.py", line 38, in ensure_async
    return await obj
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 346, in _async_pre_start_kernel
    self.kernel_spec,
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 176, in kernel_spec
    self._kernel_spec = self.kernel_spec_manager.get_kernel_spec(self.kernel_name)
  File "/usr/lib/python3.8/site-packages/jupyter_client/kernelspec.py", line 294, in get_kernel_spec
    raise NoSuchKernel(kernel_name)
jupyter_client.kernelspec.NoSuchKernel: No such kernel named python3
_______________________________________________________________ ERROR at setup of TestProj1.test_basic_build _______________________________________________________________

cls = <class 'nb2plots.tests.test_proj1.TestProj1'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
            raise e
>       cls.build_source()

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:223:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'nb2plots.tests.test_proj1.TestProj1'>

    @classmethod
    def build_source(cls):
        try:  # Catch exceptions during sphinx build
            cls.build_app.build(False, [])
            if cls.build_app.statuscode != 0:
                cls.build_error = "Unknown error"
        except Exception as e:  # Exceptions during sphinx build
            cls.build_error = e
        # We will later check if a page build that should error, did error
        if cls.build_error is None or cls.should_error:
            return
        # An unexpected error - delete temp dir and report.
        shutil.rmtree(cls.build_path)
>       raise RuntimeError('page build failed with build error {}'
                           .format(cls.build_error))
E       RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7f7305d41700> for event 'build-finished' threw an exception (exception: No such kernel named python3)

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:254: RuntimeError
____________________________________________________________ ERROR at setup of TestNotSameName.test_build_error ____________________________________________________________

cls = <class 'nb2plots.tests.test_proj1.TestNotSameName'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
            raise e
>       cls.build_source()

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:223:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'nb2plots.tests.test_proj1.TestNotSameName'>

    @classmethod
    def build_source(cls):
        try:  # Catch exceptions during sphinx build
            cls.build_app.build(False, [])
            if cls.build_app.statuscode != 0:
                cls.build_error = "Unknown error"
        except Exception as e:  # Exceptions during sphinx build
            cls.build_error = e
        # We will later check if a page build that should error, did error
        if cls.build_error is None or cls.should_error:
            return
        # An unexpected error - delete temp dir and report.
        shutil.rmtree(cls.build_path)
>       raise RuntimeError('page build failed with build error {}'
                           .format(cls.build_error))
E       RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7f7305d41700> for event 'build-finished' threw an exception (exception: No such kernel named python3)

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:254: RuntimeError
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Running Sphinx v4.5.0
making output directory... done
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 2 source files that are out of date
updating environment: [new config] 2 added, 0 changed, 0 removed
reading sources... [100%] index
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] index
generating indices... genindex done
writing additional pages... search done
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.

The HTML pages are in ../../../../../tmp/tmpg_bjj0uo/html.
---------------------------------------------------------------------------- Captured log setup ----------------------------------------------------------------------------
WARNING  traitlets:kernelspec.py:293 Kernelspec name python3 cannot be found!
ERROR    traitlets:manager.py:82 No such kernel named python3
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 75, in wrapper
    out = await method(self, *args, **kwargs)
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 383, in _async_start_kernel
    kernel_cmd, kw = await ensure_async(self.pre_start_kernel(**kw))
  File "/usr/lib/python3.8/site-packages/jupyter_client/utils.py", line 38, in ensure_async
    return await obj
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 346, in _async_pre_start_kernel
    self.kernel_spec,
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 176, in kernel_spec
    self._kernel_spec = self.kernel_spec_manager.get_kernel_spec(self.kernel_name)
  File "/usr/lib/python3.8/site-packages/jupyter_client/kernelspec.py", line 294, in get_kernel_spec
    raise NoSuchKernel(kernel_name)
jupyter_client.kernelspec.NoSuchKernel: No such kernel named python3
___________________________________________________________ ERROR at setup of TestDuplicatesOK.test_build_error ____________________________________________________________

cls = <class 'nb2plots.tests.test_runroles.TestDuplicatesOK'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
            raise e
>       cls.build_source()

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:223:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'nb2plots.tests.test_runroles.TestDuplicatesOK'>

    @classmethod
    def build_source(cls):
        try:  # Catch exceptions during sphinx build
            cls.build_app.build(False, [])
            if cls.build_app.statuscode != 0:
                cls.build_error = "Unknown error"
        except Exception as e:  # Exceptions during sphinx build
            cls.build_error = e
        # We will later check if a page build that should error, did error
        if cls.build_error is None or cls.should_error:
            return
        # An unexpected error - delete temp dir and report.
        shutil.rmtree(cls.build_path)
>       raise RuntimeError('page build failed with build error {}'
                           .format(cls.build_error))
E       RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7f7305d41700> for event 'build-finished' threw an exception (exception: No such kernel named python3)

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:254: RuntimeError
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Running Sphinx v4.5.0
making output directory... done
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 2 source files that are out of date
updating environment: [new config] 2 added, 0 changed, 0 removed
reading sources... [100%] contents
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] contents
generating indices... genindex done
writing additional pages... search done
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.

The HTML pages are in ../../../../../tmp/tmp7hxhopx9/html.
---------------------------------------------------------------------------- Captured log setup ----------------------------------------------------------------------------
WARNING  traitlets:kernelspec.py:293 Kernelspec name python3 cannot be found!
ERROR    traitlets:manager.py:82 No such kernel named python3
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 75, in wrapper
    out = await method(self, *args, **kwargs)
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 383, in _async_start_kernel
    kernel_cmd, kw = await ensure_async(self.pre_start_kernel(**kw))
  File "/usr/lib/python3.8/site-packages/jupyter_client/utils.py", line 38, in ensure_async
    return await obj
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 346, in _async_pre_start_kernel
    self.kernel_spec,
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 176, in kernel_spec
    self._kernel_spec = self.kernel_spec_manager.get_kernel_spec(self.kernel_name)
  File "/usr/lib/python3.8/site-packages/jupyter_client/kernelspec.py", line 294, in get_kernel_spec
    raise NoSuchKernel(kernel_name)
jupyter_client.kernelspec.NoSuchKernel: No such kernel named python3
______________________________________________________________ ERROR at setup of TestDuplicatesOK.test_output ______________________________________________________________

cls = <class 'nb2plots.tests.test_runroles.TestDuplicatesOK'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
            raise e
>       cls.build_source()

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:223:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'nb2plots.tests.test_runroles.TestDuplicatesOK'>

    @classmethod
    def build_source(cls):
        try:  # Catch exceptions during sphinx build
            cls.build_app.build(False, [])
            if cls.build_app.statuscode != 0:
                cls.build_error = "Unknown error"
        except Exception as e:  # Exceptions during sphinx build
            cls.build_error = e
        # We will later check if a page build that should error, did error
        if cls.build_error is None or cls.should_error:
            return
        # An unexpected error - delete temp dir and report.
        shutil.rmtree(cls.build_path)
>       raise RuntimeError('page build failed with build error {}'
                           .format(cls.build_error))
E       RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7f7305d41700> for event 'build-finished' threw an exception (exception: No such kernel named python3)

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:254: RuntimeError
_____________________________________________________________ ERROR at setup of TestNoTimeout.test_build_error _____________________________________________________________

cls = <class 'nb2plots.tests.test_timeout.TestNoTimeout'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
            raise e
>       cls.build_source()

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:223:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'nb2plots.tests.test_timeout.TestNoTimeout'>

    @classmethod
    def build_source(cls):
        try:  # Catch exceptions during sphinx build
            cls.build_app.build(False, [])
            if cls.build_app.statuscode != 0:
                cls.build_error = "Unknown error"
        except Exception as e:  # Exceptions during sphinx build
            cls.build_error = e
        # We will later check if a page build that should error, did error
        if cls.build_error is None or cls.should_error:
            return
        # An unexpected error - delete temp dir and report.
        shutil.rmtree(cls.build_path)
>       raise RuntimeError('page build failed with build error {}'
                           .format(cls.build_error))
E       RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7f7305d41700> for event 'build-finished' threw an exception (exception: No such kernel named python3)

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:254: RuntimeError
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Running Sphinx v4.5.0
making output directory... done
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 2 source files that are out of date
updating environment: [new config] 2 added, 0 changed, 0 removed
reading sources... [100%] contents
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] contents
generating indices... genindex done
writing additional pages... search done
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.

The HTML pages are in ../../../../../tmp/tmpgmbtfupb/html.
---------------------------------------------------------------------------- Captured log setup ----------------------------------------------------------------------------
WARNING  traitlets:kernelspec.py:293 Kernelspec name python3 cannot be found!
ERROR    traitlets:manager.py:82 No such kernel named python3
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 75, in wrapper
    out = await method(self, *args, **kwargs)
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 383, in _async_start_kernel
    kernel_cmd, kw = await ensure_async(self.pre_start_kernel(**kw))
  File "/usr/lib/python3.8/site-packages/jupyter_client/utils.py", line 38, in ensure_async
    return await obj
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 346, in _async_pre_start_kernel
    self.kernel_spec,
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 176, in kernel_spec
    self._kernel_spec = self.kernel_spec_manager.get_kernel_spec(self.kernel_name)
  File "/usr/lib/python3.8/site-packages/jupyter_client/kernelspec.py", line 294, in get_kernel_spec
    raise NoSuchKernel(kernel_name)
jupyter_client.kernelspec.NoSuchKernel: No such kernel named python3
_______________________________________________________________ ERROR at setup of TestNoTimeout.test_output ________________________________________________________________

cls = <class 'nb2plots.tests.test_timeout.TestNoTimeout'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
            raise e
>       cls.build_source()

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:223:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'nb2plots.tests.test_timeout.TestNoTimeout'>

    @classmethod
    def build_source(cls):
        try:  # Catch exceptions during sphinx build
            cls.build_app.build(False, [])
            if cls.build_app.statuscode != 0:
                cls.build_error = "Unknown error"
        except Exception as e:  # Exceptions during sphinx build
            cls.build_error = e
        # We will later check if a page build that should error, did error
        if cls.build_error is None or cls.should_error:
            return
        # An unexpected error - delete temp dir and report.
        shutil.rmtree(cls.build_path)
>       raise RuntimeError('page build failed with build error {}'
                           .format(cls.build_error))
E       RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7f7305d41700> for event 'build-finished' threw an exception (exception: No such kernel named python3)

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:254: RuntimeError
__________________________________________________________ ERROR at setup of TestConfigCLTimeout.test_build_error __________________________________________________________

cls = <class 'nb2plots.tests.test_timeout.TestConfigCLTimeout'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
            raise e
>       cls.build_source()

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:223:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'nb2plots.tests.test_timeout.TestConfigCLTimeout'>

    @classmethod
    def build_source(cls):
        try:  # Catch exceptions during sphinx build
            cls.build_app.build(False, [])
            if cls.build_app.statuscode != 0:
                cls.build_error = "Unknown error"
        except Exception as e:  # Exceptions during sphinx build
            cls.build_error = e
        # We will later check if a page build that should error, did error
        if cls.build_error is None or cls.should_error:
            return
        # An unexpected error - delete temp dir and report.
        shutil.rmtree(cls.build_path)
>       raise RuntimeError('page build failed with build error {}'
                           .format(cls.build_error))
E       RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7f7305d41700> for event 'build-finished' threw an exception (exception: No such kernel named python3)

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:254: RuntimeError
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Running Sphinx v4.5.0
making output directory... done
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 2 source files that are out of date
updating environment: [new config] 2 added, 0 changed, 0 removed
reading sources... [100%] contents
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] contents
generating indices... genindex done
writing additional pages... search done
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.

The HTML pages are in ../../../../../tmp/tmpeduuq1yw/html.
---------------------------------------------------------------------------- Captured log setup ----------------------------------------------------------------------------
WARNING  traitlets:kernelspec.py:293 Kernelspec name python3 cannot be found!
ERROR    traitlets:manager.py:82 No such kernel named python3
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 75, in wrapper
    out = await method(self, *args, **kwargs)
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 383, in _async_start_kernel
    kernel_cmd, kw = await ensure_async(self.pre_start_kernel(**kw))
  File "/usr/lib/python3.8/site-packages/jupyter_client/utils.py", line 38, in ensure_async
    return await obj
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 346, in _async_pre_start_kernel
    self.kernel_spec,
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 176, in kernel_spec
    self._kernel_spec = self.kernel_spec_manager.get_kernel_spec(self.kernel_name)
  File "/usr/lib/python3.8/site-packages/jupyter_client/kernelspec.py", line 294, in get_kernel_spec
    raise NoSuchKernel(kernel_name)
jupyter_client.kernelspec.NoSuchKernel: No such kernel named python3
____________________________________________________________ ERROR at setup of TestConfigCLTimeout.test_output _____________________________________________________________

cls = <class 'nb2plots.tests.test_timeout.TestConfigCLTimeout'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
            raise e
>       cls.build_source()

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:223:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'nb2plots.tests.test_timeout.TestConfigCLTimeout'>

    @classmethod
    def build_source(cls):
        try:  # Catch exceptions during sphinx build
            cls.build_app.build(False, [])
            if cls.build_app.statuscode != 0:
                cls.build_error = "Unknown error"
        except Exception as e:  # Exceptions during sphinx build
            cls.build_error = e
        # We will later check if a page build that should error, did error
        if cls.build_error is None or cls.should_error:
            return
        # An unexpected error - delete temp dir and report.
        shutil.rmtree(cls.build_path)
>       raise RuntimeError('page build failed with build error {}'
                           .format(cls.build_error))
E       RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7f7305d41700> for event 'build-finished' threw an exception (exception: No such kernel named python3)

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:254: RuntimeError
____________________________________________________________ ERROR at setup of TestBestTimeout.test_build_error ____________________________________________________________

cls = <class 'nb2plots.tests.test_timeout.TestBestTimeout'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
            raise e
>       cls.build_source()

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:223:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'nb2plots.tests.test_timeout.TestBestTimeout'>

    @classmethod
    def build_source(cls):
        try:  # Catch exceptions during sphinx build
            cls.build_app.build(False, [])
            if cls.build_app.statuscode != 0:
                cls.build_error = "Unknown error"
        except Exception as e:  # Exceptions during sphinx build
            cls.build_error = e
        # We will later check if a page build that should error, did error
        if cls.build_error is None or cls.should_error:
            return
        # An unexpected error - delete temp dir and report.
        shutil.rmtree(cls.build_path)
>       raise RuntimeError('page build failed with build error {}'
                           .format(cls.build_error))
E       RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7f7305d41700> for event 'build-finished' threw an exception (exception: No such kernel named python3)

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:254: RuntimeError
-------------------------------------------------------------------------- Captured stdout setup ---------------------------------------------------------------------------
Running Sphinx v4.5.0
making output directory... done
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 2 source files that are out of date
updating environment: [new config] 2 added, 0 changed, 0 removed
reading sources... [100%] contents
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] contents
generating indices... genindex done
writing additional pages... search done
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.

The HTML pages are in ../../../../../tmp/tmpdn888rwb/html.
---------------------------------------------------------------------------- Captured log setup ----------------------------------------------------------------------------
WARNING  traitlets:kernelspec.py:293 Kernelspec name python3 cannot be found!
ERROR    traitlets:manager.py:82 No such kernel named python3
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 75, in wrapper
    out = await method(self, *args, **kwargs)
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 383, in _async_start_kernel
    kernel_cmd, kw = await ensure_async(self.pre_start_kernel(**kw))
  File "/usr/lib/python3.8/site-packages/jupyter_client/utils.py", line 38, in ensure_async
    return await obj
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 346, in _async_pre_start_kernel
    self.kernel_spec,
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 176, in kernel_spec
    self._kernel_spec = self.kernel_spec_manager.get_kernel_spec(self.kernel_name)
  File "/usr/lib/python3.8/site-packages/jupyter_client/kernelspec.py", line 294, in get_kernel_spec
    raise NoSuchKernel(kernel_name)
jupyter_client.kernelspec.NoSuchKernel: No such kernel named python3
______________________________________________________________ ERROR at setup of TestBestTimeout.test_output _______________________________________________________________

cls = <class 'nb2plots.tests.test_timeout.TestBestTimeout'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
            raise e
>       cls.build_source()

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:223:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'nb2plots.tests.test_timeout.TestBestTimeout'>

    @classmethod
    def build_source(cls):
        try:  # Catch exceptions during sphinx build
            cls.build_app.build(False, [])
            if cls.build_app.statuscode != 0:
                cls.build_error = "Unknown error"
        except Exception as e:  # Exceptions during sphinx build
            cls.build_error = e
        # We will later check if a page build that should error, did error
        if cls.build_error is None or cls.should_error:
            return
        # An unexpected error - delete temp dir and report.
        shutil.rmtree(cls.build_path)
>       raise RuntimeError('page build failed with build error {}'
                           .format(cls.build_error))
E       RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7f7305d41700> for event 'build-finished' threw an exception (exception: No such kernel named python3)

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:254: RuntimeError
================================================================================= FAILURES =================================================================================
______________________________________________________________________________ test_codelinks ______________________________________________________________________________

self = <sphinx.events.EventManager object at 0x7f730485fd60>, name = 'build-finished', allowed_exceptions = (), args = (None,), results = []
listeners = [EventListener(id=68, handler=<function write_runfiles at 0x7f7305d41700>, priority=500)]

    def emit(self, name: str, *args: Any,
             allowed_exceptions: Tuple[Type[Exception], ...] = ()) -> List:
        """Emit a Sphinx event."""
        try:
            logger.debug('[app] emitting event: %r%s', name, repr(args)[:100])
        except Exception:
            # not every object likes to be repr()'d (think
            # random stuff coming via autodoc)
            pass

        results = []
        listeners = sorted(self.listeners[name], key=attrgetter("priority"))
        for listener in listeners:
            try:
>               results.append(listener.handler(self.app, *args))

/usr/lib/python3.8/site-packages/sphinx/events.py:94:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

app = <sphinxtesters.sphinxutils.TempApp object at 0x7f7304561d30>, exception = None

    def write_runfiles(app, exception):
        """ Write notebooks / code files when build has finished

        :func:`collect_runfiles` has already collected the files that need to be
        built, and stored then in the ``env.runroles`` dictionary.  See the
        docstring for that function for details.

        We cycle through these collected relative filenames, and build the
        necessary files using the ``write`` method of the stored role instances.

        Called at ``build-finished`` event.
        """
        if exception is not None:
            return
        for code_type, queue in app.env.runrole_queue.items():
>           NAME2ROLE[code_type].write_queue(queue, app)

nb2plots/runroles.py:309:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <nb2plots.runroles.FullNotebookRunRole object at 0x7f7305fb6700>
queue = [<runrole_reference: <#text: 'Download this  ...'>>, <runrole_reference: <#text: 'Download this  ...'>>, <runrole_reference: <#text: 'Download this  ...'>>]
app = <sphinxtesters.sphinxutils.TempApp object at 0x7f7304561d30>

    def write_queue(self, queue, app):
        """ Write queue of runnable nodes

        Choose longest timeout for duplicate builds.

        Parameters
        ----------
        queue : iterable
            Iterable of Docutils nodes, where the nodes specify runnable
            builds, including (for each node) the filename of original ReST
            document.
        app : Sphinx Application
            Application responsible for build.
        """
        # Set longest timeout to duplicates
        for docname in set(n['refdoc'] for n in queue):
            duplicates = [n for n in queue if n['refdoc'] == docname]
            timeouts = set(n['timeout'] for n in duplicates if 'timeout' in n)
            if len(timeouts) < 2:
                continue
            max_timeout = (-1 if {None, -1}.intersection(timeouts)
                           else max(timeouts))
            for n in duplicates:
                n['timeout'] = max_timeout

        for node in queue:
>           self.write(node, app)

nb2plots/runroles.py:216:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <nb2plots.runroles.FullNotebookRunRole object at 0x7f7305fb6700>, node = <runrole_reference: <#text: 'Download this  ...'>>
app = <sphinxtesters.sphinxutils.TempApp object at 0x7f7304561d30>

    def write(self, node, app):
        """ Build + cache runnable, or return build from cache.

        Parameters
        ----------
        node : docutils node
            Docutils node specifying runnable build, including filename of
            original ReST document.
        app : Sphinx Application
            Application responsible for build.
        """
        out_fname = _relfn2outpath(node['filename'], app)
>       built = self.get_built(node, app)

nb2plots/runroles.py:118:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <nb2plots.runroles.FullNotebookRunRole object at 0x7f7305fb6700>, node = <runrole_reference: <#text: 'Download this  ...'>>
app = <sphinxtesters.sphinxutils.TempApp object at 0x7f7304561d30>

    def get_built(self, node, app):
        """ Build, cache, return output object, or return from cache.

        Parameters
        ----------
        node : object
            Runrole node.
        app : object
            Sphinx application in charge of build

        Returns
        -------
        output : built output.
        """
        code_type = self.code_type
        own_params = app.env.runrole_cache[node['refdoc']]
        if own_params.get(code_type) is None:
>           own_params[code_type] = self._build(node, app)

nb2plots/runroles.py:142:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <nb2plots.runroles.FullNotebookRunRole object at 0x7f7305fb6700>, node = <runrole_reference: <#text: 'Download this  ...'>>
env = <sphinxtesters.sphinxutils.TempApp object at 0x7f7304561d30>

    def _build(self, node, env):
        """ Return byte string containing built version of `doctree` """
        empty_json = self.clear_role.get_built(node, env)
        timeout = node.get('timeout', env.config.fill_notebook_timeout)
>       full_nb = fill_notebook(nbf.reads(empty_json), timeout=timeout)

nb2plots/runroles.py:222:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

nb = {'cells': [{'cell_type': 'markdown', 'id': '87576143', 'metadata': {}, 'source': 'Text here\n\nMore text here.'}], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}
timeout = 30

    def fill_notebook(nb, timeout=30):
        """ Execute notebook `nb` and return notebook with built outputs
        """
        preprocessor = nbc.preprocessors.execute.ExecutePreprocessor(
            timeout=timeout)
        preprocessor.enabled = True
        res = nbc.exporter.ResourcesDict()
        res['metadata'] = nbc.exporter.ResourcesDict()
>       output_nb, _ = preprocessor(deepcopy(nb), res)

nb2plots/runroles.py:331:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <nbconvert.preprocessors.execute.ExecutePreprocessor object at 0x7f73044bc3d0>
nb = {'cells': [{'cell_type': 'markdown', 'id': '87576143', 'metadata': {}, 'source': 'Text here\n\nMore text here.'}], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}
resources = ResourcesDict(None, {'metadata': ResourcesDict(None, {})})

    def __call__(self, nb, resources):
        if self.enabled:
            self.log.debug("Applying preprocessor: %s", self.__class__.__name__)
>           return self.preprocess(nb, resources)

/usr/lib/python3.8/site-packages/nbconvert/preprocessors/base.py:47:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <nbconvert.preprocessors.execute.ExecutePreprocessor object at 0x7f73044bc3d0>
nb = {'cells': [{'cell_type': 'markdown', 'id': '87576143', 'metadata': {}, 'source': 'Text here\n\nMore text here.'}], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}
resources = ResourcesDict(None, {'metadata': ResourcesDict(None, {})}), km = None

    def preprocess(self, nb: NotebookNode, resources=None, km=None):
        """
        Preprocess notebook executing each code cell.

        The input argument *nb* is modified in-place.

        Note that this function recalls NotebookClient.__init__, which may look wrong.
        However since the preprocess call acts line an init on execution state it's expected.
        Therefore, we need to capture it here again to properly reset because traitlet
        assignments are not passed. There is a risk if traitlets apply any side effects for
        dual init.
        The risk should be manageable, and this approach minimizes side-effects relative
        to other alternatives.

        One alternative but rejected implementation would be to copy the client's init internals
        which has already gotten out of sync with nbclient 0.5 release before nbconvert 6.0 released.

        Parameters
        ----------
        nb : NotebookNode
            Notebook being executed.
        resources : dictionary (optional)
            Additional resources used in the conversion process. For example,
            passing ``{'metadata': {'path': run_path}}`` sets the
            execution path to ``run_path``.
        km: KernelManager (optional)
            Optional kernel manager. If none is provided, a kernel manager will
            be created.

        Returns
        -------
        nb : NotebookNode
            The executed notebook.
        resources : dictionary
            Additional resources used in the conversion process.
        """
        NotebookClient.__init__(self, nb, km)
        self.reset_execution_trackers()
        self._check_assign_resources(resources)

>       with self.setup_kernel():

/usr/lib/python3.8/site-packages/nbconvert/preprocessors/execute.py:85:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <contextlib._GeneratorContextManager object at 0x7f73044b0fd0>

    def __enter__(self):
        # do not keep args and kwds alive unnecessarily
        # they are only needed for recreation, which is not possible anymore
        del self.args, self.kwds, self.func
        try:
>           return next(self.gen)

/usr/lib64/python3.8/contextlib.py:113:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <nbconvert.preprocessors.execute.ExecutePreprocessor object at 0x7f73044bc3d0>, kwargs = {}, cleanup_kc = True

    @contextmanager
    def setup_kernel(self, **kwargs: t.Any) -> t.Generator:
        """
        Context manager for setting up the kernel to execute a notebook.

        The assigns the Kernel Manager (``self.km``) if missing and Kernel Client(``self.kc``).

        When control returns from the yield it stops the client's zmq channels, and shuts
        down the kernel.
        """
        # by default, cleanup the kernel client if we own the kernel manager
        # and keep it alive if we don't
        cleanup_kc = kwargs.pop('cleanup_kc', self.owns_km)

        # Can't use run_until_complete on an asynccontextmanager function :(
        if self.km is None:
            self.km = self.create_kernel_manager()

        if not self.km.has_kernel:
>           self.start_new_kernel(**kwargs)

/usr/lib/python3.8/site-packages/nbclient/client.py:592:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = (<nbconvert.preprocessors.execute.ExecutePreprocessor object at 0x7f73044bc3d0>,), kwargs = {}

    def wrapped(*args, **kwargs):
>       return just_run(coro(*args, **kwargs))

/usr/lib/python3.8/site-packages/nbclient/util.py:85:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

coro = <coroutine object NotebookClient.async_start_new_kernel at 0x7f73043d14c0>

    def just_run(coro: Awaitable) -> Any:
        """Make the coroutine run, even if there is an event loop running (using nest_asyncio)"""
        try:
            loop = asyncio.get_running_loop()
        except RuntimeError:
            loop = None
        if loop is None:
            had_running_loop = False
            loop = asyncio.new_event_loop()
            asyncio.set_event_loop(loop)
        else:
            had_running_loop = True
        if had_running_loop:
            # if there is a running loop, we patch using nest_asyncio
            # to have reentrant event loops
            check_ipython()
            import nest_asyncio

            nest_asyncio.apply()
            check_patch_tornado()
>       return loop.run_until_complete(coro)

/usr/lib/python3.8/site-packages/nbclient/util.py:60:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <_UnixSelectorEventLoop running=False closed=False debug=False>
future = <Task finished name='Task-4' coro=<NotebookClient.async_start_new_kernel() done, defined at /usr/lib/python3.8/site-packages/nbclient/client.py:521> exception=NoSuchKernel('python3')>

    def run_until_complete(self, future):
        """Run until the Future is done.

        If the argument is a coroutine, it is wrapped in a Task.

        WARNING: It would be disastrous to call run_until_complete()
        with the same coroutine twice -- it would wrap it in two
        different Tasks and that can't be good.

        Return the Future's result, or raise its exception.
        """
        self._check_closed()
        self._check_running()

        new_task = not futures.isfuture(future)
        future = tasks.ensure_future(future, loop=self)
        if new_task:
            # An exception is raised if the future didn't complete, so there
            # is no need to log the "destroy pending task" message
            future._log_destroy_pending = False

        future.add_done_callback(_run_until_complete_cb)
        try:
            self.run_forever()
        except:
            if new_task and future.done() and not future.cancelled():
                # The coroutine raised a BaseException. Consume the exception
                # to not log a warning, the caller doesn't have access to the
                # local task.
                future.exception()
            raise
        finally:
            future.remove_done_callback(_run_until_complete_cb)
        if not future.done():
            raise RuntimeError('Event loop stopped before Future completed.')

>       return future.result()

/usr/lib64/python3.8/asyncio/base_events.py:616:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <nbconvert.preprocessors.execute.ExecutePreprocessor object at 0x7f73044bc3d0>, kwargs = {}, resource_path = None, has_history_manager_arg = False

    async def async_start_new_kernel(self, **kwargs: t.Any) -> None:
        """Creates a new kernel.

        Parameters
        ----------
        kwargs :
            Any options for ``self.kernel_manager_class.start_kernel()``. Because
            that defaults to AsyncKernelManager, this will likely include options
            accepted by ``AsyncKernelManager.start_kernel()``, which includes ``cwd``.
        """
        assert self.km is not None
        resource_path = self.resources.get('metadata', {}).get('path') or None
        if resource_path and 'cwd' not in kwargs:
            kwargs["cwd"] = resource_path

        has_history_manager_arg = any(
            arg.startswith('--HistoryManager.hist_file') for arg in self.extra_arguments
        )
        if (
            hasattr(self.km, 'ipykernel')
            and self.km.ipykernel
            and self.ipython_hist_file
            and not has_history_manager_arg
        ):
            self.extra_arguments += [f'--HistoryManager.hist_file={self.ipython_hist_file}']

>       await ensure_async(self.km.start_kernel(extra_arguments=self.extra_arguments, **kwargs))

/usr/lib/python3.8/site-packages/nbclient/client.py:547:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

obj = <coroutine object KernelManager._async_start_kernel at 0x7f73043d1540>

    async def ensure_async(obj: Union[Awaitable, Any]) -> Any:
        """Convert a non-awaitable object to a coroutine if needed,
        and await it if it was not already awaited.
        """
        if inspect.isawaitable(obj):
            try:
>               result = await obj

/usr/lib/python3.8/site-packages/nbclient/util.py:97:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <jupyter_client.manager.AsyncKernelManager object at 0x7f73044b00a0>, args = (), kwargs = {'extra_arguments': ['--HistoryManager.hist_file=:memory:']}

    @t.no_type_check
    @functools.wraps(method)
    async def wrapper(self, *args, **kwargs):
        # Create a future for the decorated method
        try:
            self._ready = Future()
        except RuntimeError:
            # No event loop running, use concurrent future
            self._ready = CFuture()
        try:
            # call wrapped method, await, and set the result or exception.
            out = await method(self, *args, **kwargs)
            # Add a small sleep to ensure tests can capture the state before done
            await asyncio.sleep(0.01)
            self._ready.set_result(None)
            return out
        except Exception as e:
            self._ready.set_exception(e)
            self.log.exception(self._ready.exception())
>           raise e

/usr/lib/python3.8/site-packages/jupyter_client/manager.py:83:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <jupyter_client.manager.AsyncKernelManager object at 0x7f73044b00a0>, args = (), kwargs = {'extra_arguments': ['--HistoryManager.hist_file=:memory:']}

    @t.no_type_check
    @functools.wraps(method)
    async def wrapper(self, *args, **kwargs):
        # Create a future for the decorated method
        try:
            self._ready = Future()
        except RuntimeError:
            # No event loop running, use concurrent future
            self._ready = CFuture()
        try:
            # call wrapped method, await, and set the result or exception.
>           out = await method(self, *args, **kwargs)

/usr/lib/python3.8/site-packages/jupyter_client/manager.py:75:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <jupyter_client.manager.AsyncKernelManager object at 0x7f73044b00a0>, kw = {'extra_arguments': ['--HistoryManager.hist_file=:memory:']}

    @in_pending_state
    async def _async_start_kernel(self, **kw: Any) -> None:
        """Starts a kernel on this host in a separate process.

        If random ports (port=0) are being used, this method must be called
        before the channels are created.

        Parameters
        ----------
        `**kw` : optional
             keyword arguments that are passed down to build the kernel_cmd
             and launching the kernel (e.g. Popen kwargs).
        """
>       kernel_cmd, kw = await ensure_async(self.pre_start_kernel(**kw))

/usr/lib/python3.8/site-packages/jupyter_client/manager.py:383:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

obj = <coroutine object KernelManager._async_pre_start_kernel at 0x7f73043d1740>

    async def ensure_async(obj):
        if inspect.isawaitable(obj):
>           return await obj

/usr/lib/python3.8/site-packages/jupyter_client/utils.py:38:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <jupyter_client.manager.AsyncKernelManager object at 0x7f73044b00a0>, kw = {'extra_arguments': ['--HistoryManager.hist_file=:memory:']}

    async def _async_pre_start_kernel(self, **kw: Any) -> t.Tuple[t.List[str], t.Dict[str, t.Any]]:
        """Prepares a kernel for startup in a separate process.

        If random ports (port=0) are being used, this method must be called
        before the channels are created.

        Parameters
        ----------
        `**kw` : optional
             keyword arguments that are passed down to build the kernel_cmd
             and launching the kernel (e.g. Popen kwargs).
        """
        self.shutting_down = False
        self.kernel_id = self.kernel_id or kw.pop('kernel_id', str(uuid.uuid4()))
        # save kwargs for use in restart
        self._launch_args = kw.copy()
        if self.provisioner is None:  # will not be None on restarts
            self.provisioner = KPF.instance(parent=self.parent).create_provisioner_instance(
                self.kernel_id,
>               self.kernel_spec,
                parent=self,
            )

/usr/lib/python3.8/site-packages/jupyter_client/manager.py:346:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <jupyter_client.manager.AsyncKernelManager object at 0x7f73044b00a0>

    @property
    def kernel_spec(self) -> t.Optional[kernelspec.KernelSpec]:
        if self._kernel_spec is None and self.kernel_name != "":
>           self._kernel_spec = self.kernel_spec_manager.get_kernel_spec(self.kernel_name)

/usr/lib/python3.8/site-packages/jupyter_client/manager.py:176:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <jupyter_client.kernelspec.KernelSpecManager object at 0x7f73043fb9a0>, kernel_name = 'python3'

    def get_kernel_spec(self, kernel_name):
        """Returns a :class:`KernelSpec` instance for the given kernel_name.

        Raises :exc:`NoSuchKernel` if the given kernel name is not found.
        """
        if not _is_valid_kernel_name(kernel_name):
            self.log.warning(
                f"Kernelspec name {kernel_name} is invalid: {_kernel_name_description}"
            )

        resource_dir = self._find_spec_directory(kernel_name.lower())
        if resource_dir is None:
            self.log.warning(f"Kernelspec name {kernel_name} cannot be found!")
>           raise NoSuchKernel(kernel_name)
E           jupyter_client.kernelspec.NoSuchKernel: No such kernel named python3

/usr/lib/python3.8/site-packages/jupyter_client/kernelspec.py:294: NoSuchKernel

The above exception was the direct cause of the following exception:

    def test_codelinks():

        def as_pxml(rst_text):
            return to_pxml.from_rst(rst_text, resolve=False)

        page = """\
    Text here

    .. code-links::

    More text here."""
        both_re = re.compile(r"""<document source=".*?">
        <paragraph>
            Text here
        <code_links>
            <bullet_list bullet="\*">
                <list_item>
                    <paragraph>
                        <runrole_reference refdoc="contents" reftarget="/contents.py" reftype="pyfile">
                            Download this page as a Python code file
                        ;
                <list_item>
                    <paragraph>
                        <runrole_reference refdoc="contents" reftarget="/contents.ipynb" reftype="clearnotebook">
                            Download this page as a Jupyter notebook \(no outputs\)
                        ;
                <list_item>
                    <paragraph>
                        <runrole_reference refdoc="contents" reftarget="/contents_full.ipynb" reftype="fullnotebook">
                            Download this page as a Jupyter notebook \(with outputs\)
                        .
        <paragraph>
            More text here.""")
>       pxml = as_pxml(page)

nb2plots/tests/test_codelinks.py:45:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
nb2plots/tests/test_codelinks.py:15: in as_pxml
    return to_pxml.from_rst(rst_text, resolve=False)
nb2plots/converters.py:124: in from_rst
    doctree, app = self._build_rst(rst_text, resolve)
nb2plots/converters.py:84: in _build_rst
    app.build(True, [])
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:112: in build
    return super(TestApp, self).build(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/application.py:367: in build
    self.events.emit('build-finished', None)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <sphinx.events.EventManager object at 0x7f730485fd60>, name = 'build-finished', allowed_exceptions = (), args = (None,), results = []
listeners = [EventListener(id=68, handler=<function write_runfiles at 0x7f7305d41700>, priority=500)]

    def emit(self, name: str, *args: Any,
             allowed_exceptions: Tuple[Type[Exception], ...] = ()) -> List:
        """Emit a Sphinx event."""
        try:
            logger.debug('[app] emitting event: %r%s', name, repr(args)[:100])
        except Exception:
            # not every object likes to be repr()'d (think
            # random stuff coming via autodoc)
            pass

        results = []
        listeners = sorted(self.listeners[name], key=attrgetter("priority"))
        for listener in listeners:
            try:
                results.append(listener.handler(self.app, *args))
            except allowed_exceptions:
                # pass through the errors specified as *allowed_exceptions*
                raise
            except SphinxError:
                raise
            except Exception as exc:
                modname = safe_getattr(listener.handler, '__module__', None)
>               raise ExtensionError(__("Handler %r for event %r threw an exception") %
                                     (listener.handler, name), exc, modname=modname) from exc
E               sphinx.errors.ExtensionError: Handler <function write_runfiles at 0x7f7305d41700> for event 'build-finished' threw an exception (exception: No such kernel named python3)

/usr/lib/python3.8/site-packages/sphinx/events.py:102: ExtensionError
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
Running Sphinx v4.5.0
making output directory... done
building [mo]: all of 0 po files
building [pseudoxml]: all source files
updating environment: [new config] 1 added, 0 changed, 0 removed
reading sources... [100%] contents
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] contents
build succeeded.

The pseudo-XML files are in ../../../../../tmp/tmpwzalz_ie/build.
---------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------
WARNING  traitlets:kernelspec.py:293 Kernelspec name python3 cannot be found!
ERROR    traitlets:manager.py:82 No such kernel named python3
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 75, in wrapper
    out = await method(self, *args, **kwargs)
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 383, in _async_start_kernel
    kernel_cmd, kw = await ensure_async(self.pre_start_kernel(**kw))
  File "/usr/lib/python3.8/site-packages/jupyter_client/utils.py", line 38, in ensure_async
    return await obj
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 346, in _async_pre_start_kernel
    self.kernel_spec,
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 176, in kernel_spec
    self._kernel_spec = self.kernel_spec_manager.get_kernel_spec(self.kernel_name)
  File "/usr/lib/python3.8/site-packages/jupyter_client/kernelspec.py", line 294, in get_kernel_spec
    raise NoSuchKernel(kernel_name)
jupyter_client.kernelspec.NoSuchKernel: No such kernel named python3
__________________________________________________________________________ test_runrole_reference __________________________________________________________________________

self = <sphinx.events.EventManager object at 0x7f73043fb2b0>, name = 'build-finished', allowed_exceptions = (), args = (None,), results = []
listeners = [EventListener(id=68, handler=<function write_runfiles at 0x7f7305d41700>, priority=500)]

    def emit(self, name: str, *args: Any,
             allowed_exceptions: Tuple[Type[Exception], ...] = ()) -> List:
        """Emit a Sphinx event."""
        try:
            logger.debug('[app] emitting event: %r%s', name, repr(args)[:100])
        except Exception:
            # not every object likes to be repr()'d (think
            # random stuff coming via autodoc)
            pass

        results = []
        listeners = sorted(self.listeners[name], key=attrgetter("priority"))
        for listener in listeners:
            try:
>               results.append(listener.handler(self.app, *args))

/usr/lib/python3.8/site-packages/sphinx/events.py:94:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

app = <sphinxtesters.sphinxutils.TempApp object at 0x7f73043fb1f0>, exception = None

    def write_runfiles(app, exception):
        """ Write notebooks / code files when build has finished

        :func:`collect_runfiles` has already collected the files that need to be
        built, and stored then in the ``env.runroles`` dictionary.  See the
        docstring for that function for details.

        We cycle through these collected relative filenames, and build the
        necessary files using the ``write`` method of the stored role instances.

        Called at ``build-finished`` event.
        """
        if exception is not None:
            return
        for code_type, queue in app.env.runrole_queue.items():
>           NAME2ROLE[code_type].write_queue(queue, app)

nb2plots/runroles.py:309:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <nb2plots.runroles.FullNotebookRunRole object at 0x7f7305fb6700>
queue = [<runrole_reference: <#text: 'Download this  ...'>>, <runrole_reference: <#text: 'Download this  ...'>>]
app = <sphinxtesters.sphinxutils.TempApp object at 0x7f73043fb1f0>

    def write_queue(self, queue, app):
        """ Write queue of runnable nodes

        Choose longest timeout for duplicate builds.

        Parameters
        ----------
        queue : iterable
            Iterable of Docutils nodes, where the nodes specify runnable
            builds, including (for each node) the filename of original ReST
            document.
        app : Sphinx Application
            Application responsible for build.
        """
        # Set longest timeout to duplicates
        for docname in set(n['refdoc'] for n in queue):
            duplicates = [n for n in queue if n['refdoc'] == docname]
            timeouts = set(n['timeout'] for n in duplicates if 'timeout' in n)
            if len(timeouts) < 2:
                continue
            max_timeout = (-1 if {None, -1}.intersection(timeouts)
                           else max(timeouts))
            for n in duplicates:
                n['timeout'] = max_timeout

        for node in queue:
>           self.write(node, app)

nb2plots/runroles.py:216:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <nb2plots.runroles.FullNotebookRunRole object at 0x7f7305fb6700>, node = <runrole_reference: <#text: 'Download this  ...'>>
app = <sphinxtesters.sphinxutils.TempApp object at 0x7f73043fb1f0>

    def write(self, node, app):
        """ Build + cache runnable, or return build from cache.

        Parameters
        ----------
        node : docutils node
            Docutils node specifying runnable build, including filename of
            original ReST document.
        app : Sphinx Application
            Application responsible for build.
        """
        out_fname = _relfn2outpath(node['filename'], app)
>       built = self.get_built(node, app)

nb2plots/runroles.py:118:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <nb2plots.runroles.FullNotebookRunRole object at 0x7f7305fb6700>, node = <runrole_reference: <#text: 'Download this  ...'>>
app = <sphinxtesters.sphinxutils.TempApp object at 0x7f73043fb1f0>

    def get_built(self, node, app):
        """ Build, cache, return output object, or return from cache.

        Parameters
        ----------
        node : object
            Runrole node.
        app : object
            Sphinx application in charge of build

        Returns
        -------
        output : built output.
        """
        code_type = self.code_type
        own_params = app.env.runrole_cache[node['refdoc']]
        if own_params.get(code_type) is None:
>           own_params[code_type] = self._build(node, app)

nb2plots/runroles.py:142:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <nb2plots.runroles.FullNotebookRunRole object at 0x7f7305fb6700>, node = <runrole_reference: <#text: 'Download this  ...'>>
env = <sphinxtesters.sphinxutils.TempApp object at 0x7f73043fb1f0>

    def _build(self, node, env):
        """ Return byte string containing built version of `doctree` """
        empty_json = self.clear_role.get_built(node, env)
        timeout = node.get('timeout', env.config.fill_notebook_timeout)
>       full_nb = fill_notebook(nbf.reads(empty_json), timeout=timeout)

nb2plots/runroles.py:222:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

nb = {'cells': [{'cell_type': 'markdown', 'id': '26842594', 'metadata': {}, 'source': 'Some text'}], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}, timeout = 30

    def fill_notebook(nb, timeout=30):
        """ Execute notebook `nb` and return notebook with built outputs
        """
        preprocessor = nbc.preprocessors.execute.ExecutePreprocessor(
            timeout=timeout)
        preprocessor.enabled = True
        res = nbc.exporter.ResourcesDict()
        res['metadata'] = nbc.exporter.ResourcesDict()
>       output_nb, _ = preprocessor(deepcopy(nb), res)

nb2plots/runroles.py:331:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <nbconvert.preprocessors.execute.ExecutePreprocessor object at 0x7f7304256e80>
nb = {'cells': [{'cell_type': 'markdown', 'id': '26842594', 'metadata': {}, 'source': 'Some text'}], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}
resources = ResourcesDict(None, {'metadata': ResourcesDict(None, {})})

    def __call__(self, nb, resources):
        if self.enabled:
            self.log.debug("Applying preprocessor: %s", self.__class__.__name__)
>           return self.preprocess(nb, resources)

/usr/lib/python3.8/site-packages/nbconvert/preprocessors/base.py:47:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <nbconvert.preprocessors.execute.ExecutePreprocessor object at 0x7f7304256e80>
nb = {'cells': [{'cell_type': 'markdown', 'id': '26842594', 'metadata': {}, 'source': 'Some text'}], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}
resources = ResourcesDict(None, {'metadata': ResourcesDict(None, {})}), km = None

    def preprocess(self, nb: NotebookNode, resources=None, km=None):
        """
        Preprocess notebook executing each code cell.

        The input argument *nb* is modified in-place.

        Note that this function recalls NotebookClient.__init__, which may look wrong.
        However since the preprocess call acts line an init on execution state it's expected.
        Therefore, we need to capture it here again to properly reset because traitlet
        assignments are not passed. There is a risk if traitlets apply any side effects for
        dual init.
        The risk should be manageable, and this approach minimizes side-effects relative
        to other alternatives.

        One alternative but rejected implementation would be to copy the client's init internals
        which has already gotten out of sync with nbclient 0.5 release before nbconvert 6.0 released.

        Parameters
        ----------
        nb : NotebookNode
            Notebook being executed.
        resources : dictionary (optional)
            Additional resources used in the conversion process. For example,
            passing ``{'metadata': {'path': run_path}}`` sets the
            execution path to ``run_path``.
        km: KernelManager (optional)
            Optional kernel manager. If none is provided, a kernel manager will
            be created.

        Returns
        -------
        nb : NotebookNode
            The executed notebook.
        resources : dictionary
            Additional resources used in the conversion process.
        """
        NotebookClient.__init__(self, nb, km)
        self.reset_execution_trackers()
        self._check_assign_resources(resources)

>       with self.setup_kernel():

/usr/lib/python3.8/site-packages/nbconvert/preprocessors/execute.py:85:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <contextlib._GeneratorContextManager object at 0x7f7304256ee0>

    def __enter__(self):
        # do not keep args and kwds alive unnecessarily
        # they are only needed for recreation, which is not possible anymore
        del self.args, self.kwds, self.func
        try:
>           return next(self.gen)

/usr/lib64/python3.8/contextlib.py:113:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <nbconvert.preprocessors.execute.ExecutePreprocessor object at 0x7f7304256e80>, kwargs = {}, cleanup_kc = True

    @contextmanager
    def setup_kernel(self, **kwargs: t.Any) -> t.Generator:
        """
        Context manager for setting up the kernel to execute a notebook.

        The assigns the Kernel Manager (``self.km``) if missing and Kernel Client(``self.kc``).

        When control returns from the yield it stops the client's zmq channels, and shuts
        down the kernel.
        """
        # by default, cleanup the kernel client if we own the kernel manager
        # and keep it alive if we don't
        cleanup_kc = kwargs.pop('cleanup_kc', self.owns_km)

        # Can't use run_until_complete on an asynccontextmanager function :(
        if self.km is None:
            self.km = self.create_kernel_manager()

        if not self.km.has_kernel:
>           self.start_new_kernel(**kwargs)

/usr/lib/python3.8/site-packages/nbclient/client.py:592:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = (<nbconvert.preprocessors.execute.ExecutePreprocessor object at 0x7f7304256e80>,), kwargs = {}

    def wrapped(*args, **kwargs):
>       return just_run(coro(*args, **kwargs))

/usr/lib/python3.8/site-packages/nbclient/util.py:85:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

coro = <coroutine object NotebookClient.async_start_new_kernel at 0x7f7304100d40>

    def just_run(coro: Awaitable) -> Any:
        """Make the coroutine run, even if there is an event loop running (using nest_asyncio)"""
        try:
            loop = asyncio.get_running_loop()
        except RuntimeError:
            loop = None
        if loop is None:
            had_running_loop = False
            loop = asyncio.new_event_loop()
            asyncio.set_event_loop(loop)
        else:
            had_running_loop = True
        if had_running_loop:
            # if there is a running loop, we patch using nest_asyncio
            # to have reentrant event loops
            check_ipython()
            import nest_asyncio

            nest_asyncio.apply()
            check_patch_tornado()
>       return loop.run_until_complete(coro)

/usr/lib/python3.8/site-packages/nbclient/util.py:60:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <_UnixSelectorEventLoop running=False closed=False debug=False>
future = <Task finished name='Task-6' coro=<NotebookClient.async_start_new_kernel() done, defined at /usr/lib/python3.8/site-packages/nbclient/client.py:521> exception=NoSuchKernel('python3')>

    def run_until_complete(self, future):
        """Run until the Future is done.

        If the argument is a coroutine, it is wrapped in a Task.

        WARNING: It would be disastrous to call run_until_complete()
        with the same coroutine twice -- it would wrap it in two
        different Tasks and that can't be good.

        Return the Future's result, or raise its exception.
        """
        self._check_closed()
        self._check_running()

        new_task = not futures.isfuture(future)
        future = tasks.ensure_future(future, loop=self)
        if new_task:
            # An exception is raised if the future didn't complete, so there
            # is no need to log the "destroy pending task" message
            future._log_destroy_pending = False

        future.add_done_callback(_run_until_complete_cb)
        try:
            self.run_forever()
        except:
            if new_task and future.done() and not future.cancelled():
                # The coroutine raised a BaseException. Consume the exception
                # to not log a warning, the caller doesn't have access to the
                # local task.
                future.exception()
            raise
        finally:
            future.remove_done_callback(_run_until_complete_cb)
        if not future.done():
            raise RuntimeError('Event loop stopped before Future completed.')

>       return future.result()

/usr/lib64/python3.8/asyncio/base_events.py:616:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <nbconvert.preprocessors.execute.ExecutePreprocessor object at 0x7f7304256e80>, kwargs = {}, resource_path = None, has_history_manager_arg = False

    async def async_start_new_kernel(self, **kwargs: t.Any) -> None:
        """Creates a new kernel.

        Parameters
        ----------
        kwargs :
            Any options for ``self.kernel_manager_class.start_kernel()``. Because
            that defaults to AsyncKernelManager, this will likely include options
            accepted by ``AsyncKernelManager.start_kernel()``, which includes ``cwd``.
        """
        assert self.km is not None
        resource_path = self.resources.get('metadata', {}).get('path') or None
        if resource_path and 'cwd' not in kwargs:
            kwargs["cwd"] = resource_path

        has_history_manager_arg = any(
            arg.startswith('--HistoryManager.hist_file') for arg in self.extra_arguments
        )
        if (
            hasattr(self.km, 'ipykernel')
            and self.km.ipykernel
            and self.ipython_hist_file
            and not has_history_manager_arg
        ):
            self.extra_arguments += [f'--HistoryManager.hist_file={self.ipython_hist_file}']

>       await ensure_async(self.km.start_kernel(extra_arguments=self.extra_arguments, **kwargs))

/usr/lib/python3.8/site-packages/nbclient/client.py:547:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

obj = <coroutine object KernelManager._async_start_kernel at 0x7f7304100cc0>

    async def ensure_async(obj: Union[Awaitable, Any]) -> Any:
        """Convert a non-awaitable object to a coroutine if needed,
        and await it if it was not already awaited.
        """
        if inspect.isawaitable(obj):
            try:
>               result = await obj

/usr/lib/python3.8/site-packages/nbclient/util.py:97:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <jupyter_client.manager.AsyncKernelManager object at 0x7f7304256fa0>, args = (), kwargs = {'extra_arguments': ['--HistoryManager.hist_file=:memory:']}

    @t.no_type_check
    @functools.wraps(method)
    async def wrapper(self, *args, **kwargs):
        # Create a future for the decorated method
        try:
            self._ready = Future()
        except RuntimeError:
            # No event loop running, use concurrent future
            self._ready = CFuture()
        try:
            # call wrapped method, await, and set the result or exception.
            out = await method(self, *args, **kwargs)
            # Add a small sleep to ensure tests can capture the state before done
            await asyncio.sleep(0.01)
            self._ready.set_result(None)
            return out
        except Exception as e:
            self._ready.set_exception(e)
            self.log.exception(self._ready.exception())
>           raise e

/usr/lib/python3.8/site-packages/jupyter_client/manager.py:83:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <jupyter_client.manager.AsyncKernelManager object at 0x7f7304256fa0>, args = (), kwargs = {'extra_arguments': ['--HistoryManager.hist_file=:memory:']}

    @t.no_type_check
    @functools.wraps(method)
    async def wrapper(self, *args, **kwargs):
        # Create a future for the decorated method
        try:
            self._ready = Future()
        except RuntimeError:
            # No event loop running, use concurrent future
            self._ready = CFuture()
        try:
            # call wrapped method, await, and set the result or exception.
>           out = await method(self, *args, **kwargs)

/usr/lib/python3.8/site-packages/jupyter_client/manager.py:75:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <jupyter_client.manager.AsyncKernelManager object at 0x7f7304256fa0>, kw = {'extra_arguments': ['--HistoryManager.hist_file=:memory:']}

    @in_pending_state
    async def _async_start_kernel(self, **kw: Any) -> None:
        """Starts a kernel on this host in a separate process.

        If random ports (port=0) are being used, this method must be called
        before the channels are created.

        Parameters
        ----------
        `**kw` : optional
             keyword arguments that are passed down to build the kernel_cmd
             and launching the kernel (e.g. Popen kwargs).
        """
>       kernel_cmd, kw = await ensure_async(self.pre_start_kernel(**kw))

/usr/lib/python3.8/site-packages/jupyter_client/manager.py:383:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

obj = <coroutine object KernelManager._async_pre_start_kernel at 0x7f7304100f40>

    async def ensure_async(obj):
        if inspect.isawaitable(obj):
>           return await obj

/usr/lib/python3.8/site-packages/jupyter_client/utils.py:38:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <jupyter_client.manager.AsyncKernelManager object at 0x7f7304256fa0>, kw = {'extra_arguments': ['--HistoryManager.hist_file=:memory:']}

    async def _async_pre_start_kernel(self, **kw: Any) -> t.Tuple[t.List[str], t.Dict[str, t.Any]]:
        """Prepares a kernel for startup in a separate process.

        If random ports (port=0) are being used, this method must be called
        before the channels are created.

        Parameters
        ----------
        `**kw` : optional
             keyword arguments that are passed down to build the kernel_cmd
             and launching the kernel (e.g. Popen kwargs).
        """
        self.shutting_down = False
        self.kernel_id = self.kernel_id or kw.pop('kernel_id', str(uuid.uuid4()))
        # save kwargs for use in restart
        self._launch_args = kw.copy()
        if self.provisioner is None:  # will not be None on restarts
            self.provisioner = KPF.instance(parent=self.parent).create_provisioner_instance(
                self.kernel_id,
>               self.kernel_spec,
                parent=self,
            )

/usr/lib/python3.8/site-packages/jupyter_client/manager.py:346:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <jupyter_client.manager.AsyncKernelManager object at 0x7f7304256fa0>

    @property
    def kernel_spec(self) -> t.Optional[kernelspec.KernelSpec]:
        if self._kernel_spec is None and self.kernel_name != "":
>           self._kernel_spec = self.kernel_spec_manager.get_kernel_spec(self.kernel_name)

/usr/lib/python3.8/site-packages/jupyter_client/manager.py:176:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <jupyter_client.kernelspec.KernelSpecManager object at 0x7f7303e63b50>, kernel_name = 'python3'

    def get_kernel_spec(self, kernel_name):
        """Returns a :class:`KernelSpec` instance for the given kernel_name.

        Raises :exc:`NoSuchKernel` if the given kernel name is not found.
        """
        if not _is_valid_kernel_name(kernel_name):
            self.log.warning(
                f"Kernelspec name {kernel_name} is invalid: {_kernel_name_description}"
            )

        resource_dir = self._find_spec_directory(kernel_name.lower())
        if resource_dir is None:
            self.log.warning(f"Kernelspec name {kernel_name} cannot be found!")
>           raise NoSuchKernel(kernel_name)
E           jupyter_client.kernelspec.NoSuchKernel: No such kernel named python3

/usr/lib/python3.8/site-packages/jupyter_client/kernelspec.py:294: NoSuchKernel

The above exception was the direct cause of the following exception:

    def test_runrole_reference():
        # Ignore notebook reference in source ReST
        assert_rst_cells_equal('Some text :clearnotebook:`.`',
                               [n_md_c('Some text')])
>       assert_rst_cells_equal('Some text :fullnotebook:`.`',
                               [n_md_c('Some text')])

nb2plots/tests/test_doctree2nb.py:52:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
nb2plots/tests/test_doctree2nb.py:39: in assert_rst_cells_equal
    actual = to_notebook.from_rst(rst_text)
nb2plots/converters.py:124: in from_rst
    doctree, app = self._build_rst(rst_text, resolve)
nb2plots/converters.py:84: in _build_rst
    app.build(True, [])
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:112: in build
    return super(TestApp, self).build(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/application.py:367: in build
    self.events.emit('build-finished', None)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <sphinx.events.EventManager object at 0x7f73043fb2b0>, name = 'build-finished', allowed_exceptions = (), args = (None,), results = []
listeners = [EventListener(id=68, handler=<function write_runfiles at 0x7f7305d41700>, priority=500)]

    def emit(self, name: str, *args: Any,
             allowed_exceptions: Tuple[Type[Exception], ...] = ()) -> List:
        """Emit a Sphinx event."""
        try:
            logger.debug('[app] emitting event: %r%s', name, repr(args)[:100])
        except Exception:
            # not every object likes to be repr()'d (think
            # random stuff coming via autodoc)
            pass

        results = []
        listeners = sorted(self.listeners[name], key=attrgetter("priority"))
        for listener in listeners:
            try:
                results.append(listener.handler(self.app, *args))
            except allowed_exceptions:
                # pass through the errors specified as *allowed_exceptions*
                raise
            except SphinxError:
                raise
            except Exception as exc:
                modname = safe_getattr(listener.handler, '__module__', None)
>               raise ExtensionError(__("Handler %r for event %r threw an exception") %
                                     (listener.handler, name), exc, modname=modname) from exc
E               sphinx.errors.ExtensionError: Handler <function write_runfiles at 0x7f7305d41700> for event 'build-finished' threw an exception (exception: No such kernel named python3)

/usr/lib/python3.8/site-packages/sphinx/events.py:102: ExtensionError
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
Running Sphinx v4.5.0
making output directory... done
building [mo]: all of 0 po files
building [jupyter]: all source files
updating environment: [new config] 1 added, 0 changed, 0 removed
reading sources... [100%] contents
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] contents
build succeeded.

The text files are in ../../../../../tmp/tmps8qc4r6i/build.
Running Sphinx v4.5.0
making output directory... done
building [mo]: all of 0 po files
building [jupyter]: all source files
updating environment: [new config] 1 added, 0 changed, 0 removed
reading sources... [100%] contents
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] contents
build succeeded.

The text files are in ../../../../../tmp/tmpx8qd2kpn/build.
---------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------
WARNING  traitlets:kernelspec.py:293 Kernelspec name python3 cannot be found!
ERROR    traitlets:manager.py:82 No such kernel named python3
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 75, in wrapper
    out = await method(self, *args, **kwargs)
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 383, in _async_start_kernel
    kernel_cmd, kw = await ensure_async(self.pre_start_kernel(**kw))
  File "/usr/lib/python3.8/site-packages/jupyter_client/utils.py", line 38, in ensure_async
    return await obj
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 346, in _async_pre_start_kernel
    self.kernel_spec,
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 176, in kernel_spec
    self._kernel_spec = self.kernel_spec_manager.get_kernel_spec(self.kernel_name)
  File "/usr/lib/python3.8/site-packages/jupyter_client/kernelspec.py", line 294, in get_kernel_spec
    raise NoSuchKernel(kernel_name)
jupyter_client.kernelspec.NoSuchKernel: No such kernel named python3
__________________________________________________________________________ test_runrole_doctrees ___________________________________________________________________________

self = <sphinx.events.EventManager object at 0x7f72f9bc49d0>, name = 'build-finished', allowed_exceptions = (), args = (None,), results = []
listeners = [EventListener(id=68, handler=<function write_runfiles at 0x7f7305d41700>, priority=500)]

    def emit(self, name: str, *args: Any,
             allowed_exceptions: Tuple[Type[Exception], ...] = ()) -> List:
        """Emit a Sphinx event."""
        try:
            logger.debug('[app] emitting event: %r%s', name, repr(args)[:100])
        except Exception:
            # not every object likes to be repr()'d (think
            # random stuff coming via autodoc)
            pass

        results = []
        listeners = sorted(self.listeners[name], key=attrgetter("priority"))
        for listener in listeners:
            try:
>               results.append(listener.handler(self.app, *args))

/usr/lib/python3.8/site-packages/sphinx/events.py:94:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

app = <sphinxtesters.sphinxutils.TempApp object at 0x7f72f9e6e6d0>, exception = None

    def write_runfiles(app, exception):
        """ Write notebooks / code files when build has finished

        :func:`collect_runfiles` has already collected the files that need to be
        built, and stored then in the ``env.runroles`` dictionary.  See the
        docstring for that function for details.

        We cycle through these collected relative filenames, and build the
        necessary files using the ``write`` method of the stored role instances.

        Called at ``build-finished`` event.
        """
        if exception is not None:
            return
        for code_type, queue in app.env.runrole_queue.items():
>           NAME2ROLE[code_type].write_queue(queue, app)

nb2plots/runroles.py:309:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <nb2plots.runroles.FullNotebookRunRole object at 0x7f7305fb6700>
queue = [<runrole_reference: <#text: 'Download this  ...'>>, <runrole_reference: <#text: 'Download this  ...'>>]
app = <sphinxtesters.sphinxutils.TempApp object at 0x7f72f9e6e6d0>

    def write_queue(self, queue, app):
        """ Write queue of runnable nodes

        Choose longest timeout for duplicate builds.

        Parameters
        ----------
        queue : iterable
            Iterable of Docutils nodes, where the nodes specify runnable
            builds, including (for each node) the filename of original ReST
            document.
        app : Sphinx Application
            Application responsible for build.
        """
        # Set longest timeout to duplicates
        for docname in set(n['refdoc'] for n in queue):
            duplicates = [n for n in queue if n['refdoc'] == docname]
            timeouts = set(n['timeout'] for n in duplicates if 'timeout' in n)
            if len(timeouts) < 2:
                continue
            max_timeout = (-1 if {None, -1}.intersection(timeouts)
                           else max(timeouts))
            for n in duplicates:
                n['timeout'] = max_timeout

        for node in queue:
>           self.write(node, app)

nb2plots/runroles.py:216:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <nb2plots.runroles.FullNotebookRunRole object at 0x7f7305fb6700>, node = <runrole_reference: <#text: 'Download this  ...'>>
app = <sphinxtesters.sphinxutils.TempApp object at 0x7f72f9e6e6d0>

    def write(self, node, app):
        """ Build + cache runnable, or return build from cache.

        Parameters
        ----------
        node : docutils node
            Docutils node specifying runnable build, including filename of
            original ReST document.
        app : Sphinx Application
            Application responsible for build.
        """
        out_fname = _relfn2outpath(node['filename'], app)
>       built = self.get_built(node, app)

nb2plots/runroles.py:118:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <nb2plots.runroles.FullNotebookRunRole object at 0x7f7305fb6700>, node = <runrole_reference: <#text: 'Download this  ...'>>
app = <sphinxtesters.sphinxutils.TempApp object at 0x7f72f9e6e6d0>

    def get_built(self, node, app):
        """ Build, cache, return output object, or return from cache.

        Parameters
        ----------
        node : object
            Runrole node.
        app : object
            Sphinx application in charge of build

        Returns
        -------
        output : built output.
        """
        code_type = self.code_type
        own_params = app.env.runrole_cache[node['refdoc']]
        if own_params.get(code_type) is None:
>           own_params[code_type] = self._build(node, app)

nb2plots/runroles.py:142:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <nb2plots.runroles.FullNotebookRunRole object at 0x7f7305fb6700>, node = <runrole_reference: <#text: 'Download this  ...'>>
env = <sphinxtesters.sphinxutils.TempApp object at 0x7f72f9e6e6d0>

    def _build(self, node, env):
        """ Return byte string containing built version of `doctree` """
        empty_json = self.clear_role.get_built(node, env)
        timeout = node.get('timeout', env.config.fill_notebook_timeout)
>       full_nb = fill_notebook(nbf.reads(empty_json), timeout=timeout)

nb2plots/runroles.py:222:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

nb = {'cells': [{'cell_type': 'markdown', 'id': '839d97d8', 'metadata': {}, 'source': 'Text then  then text.'}], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}
timeout = 30

    def fill_notebook(nb, timeout=30):
        """ Execute notebook `nb` and return notebook with built outputs
        """
        preprocessor = nbc.preprocessors.execute.ExecutePreprocessor(
            timeout=timeout)
        preprocessor.enabled = True
        res = nbc.exporter.ResourcesDict()
        res['metadata'] = nbc.exporter.ResourcesDict()
>       output_nb, _ = preprocessor(deepcopy(nb), res)

nb2plots/runroles.py:331:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <nbconvert.preprocessors.execute.ExecutePreprocessor object at 0x7f72f9e84160>
nb = {'cells': [{'cell_type': 'markdown', 'id': '839d97d8', 'metadata': {}, 'source': 'Text then  then text.'}], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}
resources = ResourcesDict(None, {'metadata': ResourcesDict(None, {})})

    def __call__(self, nb, resources):
        if self.enabled:
            self.log.debug("Applying preprocessor: %s", self.__class__.__name__)
>           return self.preprocess(nb, resources)

/usr/lib/python3.8/site-packages/nbconvert/preprocessors/base.py:47:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <nbconvert.preprocessors.execute.ExecutePreprocessor object at 0x7f72f9e84160>
nb = {'cells': [{'cell_type': 'markdown', 'id': '839d97d8', 'metadata': {}, 'source': 'Text then  then text.'}], 'metadata': {}, 'nbformat': 4, 'nbformat_minor': 5}
resources = ResourcesDict(None, {'metadata': ResourcesDict(None, {})}), km = None

    def preprocess(self, nb: NotebookNode, resources=None, km=None):
        """
        Preprocess notebook executing each code cell.

        The input argument *nb* is modified in-place.

        Note that this function recalls NotebookClient.__init__, which may look wrong.
        However since the preprocess call acts line an init on execution state it's expected.
        Therefore, we need to capture it here again to properly reset because traitlet
        assignments are not passed. There is a risk if traitlets apply any side effects for
        dual init.
        The risk should be manageable, and this approach minimizes side-effects relative
        to other alternatives.

        One alternative but rejected implementation would be to copy the client's init internals
        which has already gotten out of sync with nbclient 0.5 release before nbconvert 6.0 released.

        Parameters
        ----------
        nb : NotebookNode
            Notebook being executed.
        resources : dictionary (optional)
            Additional resources used in the conversion process. For example,
            passing ``{'metadata': {'path': run_path}}`` sets the
            execution path to ``run_path``.
        km: KernelManager (optional)
            Optional kernel manager. If none is provided, a kernel manager will
            be created.

        Returns
        -------
        nb : NotebookNode
            The executed notebook.
        resources : dictionary
            Additional resources used in the conversion process.
        """
        NotebookClient.__init__(self, nb, km)
        self.reset_execution_trackers()
        self._check_assign_resources(resources)

>       with self.setup_kernel():

/usr/lib/python3.8/site-packages/nbconvert/preprocessors/execute.py:85:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <contextlib._GeneratorContextManager object at 0x7f72f9bc48e0>

    def __enter__(self):
        # do not keep args and kwds alive unnecessarily
        # they are only needed for recreation, which is not possible anymore
        del self.args, self.kwds, self.func
        try:
>           return next(self.gen)

/usr/lib64/python3.8/contextlib.py:113:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <nbconvert.preprocessors.execute.ExecutePreprocessor object at 0x7f72f9e84160>, kwargs = {}, cleanup_kc = True

    @contextmanager
    def setup_kernel(self, **kwargs: t.Any) -> t.Generator:
        """
        Context manager for setting up the kernel to execute a notebook.

        The assigns the Kernel Manager (``self.km``) if missing and Kernel Client(``self.kc``).

        When control returns from the yield it stops the client's zmq channels, and shuts
        down the kernel.
        """
        # by default, cleanup the kernel client if we own the kernel manager
        # and keep it alive if we don't
        cleanup_kc = kwargs.pop('cleanup_kc', self.owns_km)

        # Can't use run_until_complete on an asynccontextmanager function :(
        if self.km is None:
            self.km = self.create_kernel_manager()

        if not self.km.has_kernel:
>           self.start_new_kernel(**kwargs)

/usr/lib/python3.8/site-packages/nbclient/client.py:592:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

args = (<nbconvert.preprocessors.execute.ExecutePreprocessor object at 0x7f72f9e84160>,), kwargs = {}

    def wrapped(*args, **kwargs):
>       return just_run(coro(*args, **kwargs))

/usr/lib/python3.8/site-packages/nbclient/util.py:85:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

coro = <coroutine object NotebookClient.async_start_new_kernel at 0x7f72f9ad8ec0>

    def just_run(coro: Awaitable) -> Any:
        """Make the coroutine run, even if there is an event loop running (using nest_asyncio)"""
        try:
            loop = asyncio.get_running_loop()
        except RuntimeError:
            loop = None
        if loop is None:
            had_running_loop = False
            loop = asyncio.new_event_loop()
            asyncio.set_event_loop(loop)
        else:
            had_running_loop = True
        if had_running_loop:
            # if there is a running loop, we patch using nest_asyncio
            # to have reentrant event loops
            check_ipython()
            import nest_asyncio

            nest_asyncio.apply()
            check_patch_tornado()
>       return loop.run_until_complete(coro)

/usr/lib/python3.8/site-packages/nbclient/util.py:60:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <_UnixSelectorEventLoop running=False closed=False debug=False>
future = <Task finished name='Task-10' coro=<NotebookClient.async_start_new_kernel() done, defined at /usr/lib/python3.8/site-packages/nbclient/client.py:521> exception=NoSuchKernel('python3')>

    def run_until_complete(self, future):
        """Run until the Future is done.

        If the argument is a coroutine, it is wrapped in a Task.

        WARNING: It would be disastrous to call run_until_complete()
        with the same coroutine twice -- it would wrap it in two
        different Tasks and that can't be good.

        Return the Future's result, or raise its exception.
        """
        self._check_closed()
        self._check_running()

        new_task = not futures.isfuture(future)
        future = tasks.ensure_future(future, loop=self)
        if new_task:
            # An exception is raised if the future didn't complete, so there
            # is no need to log the "destroy pending task" message
            future._log_destroy_pending = False

        future.add_done_callback(_run_until_complete_cb)
        try:
            self.run_forever()
        except:
            if new_task and future.done() and not future.cancelled():
                # The coroutine raised a BaseException. Consume the exception
                # to not log a warning, the caller doesn't have access to the
                # local task.
                future.exception()
            raise
        finally:
            future.remove_done_callback(_run_until_complete_cb)
        if not future.done():
            raise RuntimeError('Event loop stopped before Future completed.')

>       return future.result()

/usr/lib64/python3.8/asyncio/base_events.py:616:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <nbconvert.preprocessors.execute.ExecutePreprocessor object at 0x7f72f9e84160>, kwargs = {}, resource_path = None, has_history_manager_arg = False

    async def async_start_new_kernel(self, **kwargs: t.Any) -> None:
        """Creates a new kernel.

        Parameters
        ----------
        kwargs :
            Any options for ``self.kernel_manager_class.start_kernel()``. Because
            that defaults to AsyncKernelManager, this will likely include options
            accepted by ``AsyncKernelManager.start_kernel()``, which includes ``cwd``.
        """
        assert self.km is not None
        resource_path = self.resources.get('metadata', {}).get('path') or None
        if resource_path and 'cwd' not in kwargs:
            kwargs["cwd"] = resource_path

        has_history_manager_arg = any(
            arg.startswith('--HistoryManager.hist_file') for arg in self.extra_arguments
        )
        if (
            hasattr(self.km, 'ipykernel')
            and self.km.ipykernel
            and self.ipython_hist_file
            and not has_history_manager_arg
        ):
            self.extra_arguments += [f'--HistoryManager.hist_file={self.ipython_hist_file}']

>       await ensure_async(self.km.start_kernel(extra_arguments=self.extra_arguments, **kwargs))

/usr/lib/python3.8/site-packages/nbclient/client.py:547:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

obj = <coroutine object KernelManager._async_start_kernel at 0x7f72f9ad8e40>

    async def ensure_async(obj: Union[Awaitable, Any]) -> Any:
        """Convert a non-awaitable object to a coroutine if needed,
        and await it if it was not already awaited.
        """
        if inspect.isawaitable(obj):
            try:
>               result = await obj

/usr/lib/python3.8/site-packages/nbclient/util.py:97:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <jupyter_client.manager.AsyncKernelManager object at 0x7f72f9a00490>, args = (), kwargs = {'extra_arguments': ['--HistoryManager.hist_file=:memory:']}

    @t.no_type_check
    @functools.wraps(method)
    async def wrapper(self, *args, **kwargs):
        # Create a future for the decorated method
        try:
            self._ready = Future()
        except RuntimeError:
            # No event loop running, use concurrent future
            self._ready = CFuture()
        try:
            # call wrapped method, await, and set the result or exception.
            out = await method(self, *args, **kwargs)
            # Add a small sleep to ensure tests can capture the state before done
            await asyncio.sleep(0.01)
            self._ready.set_result(None)
            return out
        except Exception as e:
            self._ready.set_exception(e)
            self.log.exception(self._ready.exception())
>           raise e

/usr/lib/python3.8/site-packages/jupyter_client/manager.py:83:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <jupyter_client.manager.AsyncKernelManager object at 0x7f72f9a00490>, args = (), kwargs = {'extra_arguments': ['--HistoryManager.hist_file=:memory:']}

    @t.no_type_check
    @functools.wraps(method)
    async def wrapper(self, *args, **kwargs):
        # Create a future for the decorated method
        try:
            self._ready = Future()
        except RuntimeError:
            # No event loop running, use concurrent future
            self._ready = CFuture()
        try:
            # call wrapped method, await, and set the result or exception.
>           out = await method(self, *args, **kwargs)

/usr/lib/python3.8/site-packages/jupyter_client/manager.py:75:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <jupyter_client.manager.AsyncKernelManager object at 0x7f72f9a00490>, kw = {'extra_arguments': ['--HistoryManager.hist_file=:memory:']}

    @in_pending_state
    async def _async_start_kernel(self, **kw: Any) -> None:
        """Starts a kernel on this host in a separate process.

        If random ports (port=0) are being used, this method must be called
        before the channels are created.

        Parameters
        ----------
        `**kw` : optional
             keyword arguments that are passed down to build the kernel_cmd
             and launching the kernel (e.g. Popen kwargs).
        """
>       kernel_cmd, kw = await ensure_async(self.pre_start_kernel(**kw))

/usr/lib/python3.8/site-packages/jupyter_client/manager.py:383:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

obj = <coroutine object KernelManager._async_pre_start_kernel at 0x7f72f9ad8b40>

    async def ensure_async(obj):
        if inspect.isawaitable(obj):
>           return await obj

/usr/lib/python3.8/site-packages/jupyter_client/utils.py:38:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <jupyter_client.manager.AsyncKernelManager object at 0x7f72f9a00490>, kw = {'extra_arguments': ['--HistoryManager.hist_file=:memory:']}

    async def _async_pre_start_kernel(self, **kw: Any) -> t.Tuple[t.List[str], t.Dict[str, t.Any]]:
        """Prepares a kernel for startup in a separate process.

        If random ports (port=0) are being used, this method must be called
        before the channels are created.

        Parameters
        ----------
        `**kw` : optional
             keyword arguments that are passed down to build the kernel_cmd
             and launching the kernel (e.g. Popen kwargs).
        """
        self.shutting_down = False
        self.kernel_id = self.kernel_id or kw.pop('kernel_id', str(uuid.uuid4()))
        # save kwargs for use in restart
        self._launch_args = kw.copy()
        if self.provisioner is None:  # will not be None on restarts
            self.provisioner = KPF.instance(parent=self.parent).create_provisioner_instance(
                self.kernel_id,
>               self.kernel_spec,
                parent=self,
            )

/usr/lib/python3.8/site-packages/jupyter_client/manager.py:346:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <jupyter_client.manager.AsyncKernelManager object at 0x7f72f9a00490>

    @property
    def kernel_spec(self) -> t.Optional[kernelspec.KernelSpec]:
        if self._kernel_spec is None and self.kernel_name != "":
>           self._kernel_spec = self.kernel_spec_manager.get_kernel_spec(self.kernel_name)

/usr/lib/python3.8/site-packages/jupyter_client/manager.py:176:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <jupyter_client.kernelspec.KernelSpecManager object at 0x7f72f9e767f0>, kernel_name = 'python3'

    def get_kernel_spec(self, kernel_name):
        """Returns a :class:`KernelSpec` instance for the given kernel_name.

        Raises :exc:`NoSuchKernel` if the given kernel name is not found.
        """
        if not _is_valid_kernel_name(kernel_name):
            self.log.warning(
                f"Kernelspec name {kernel_name} is invalid: {_kernel_name_description}"
            )

        resource_dir = self._find_spec_directory(kernel_name.lower())
        if resource_dir is None:
            self.log.warning(f"Kernelspec name {kernel_name} cannot be found!")
>           raise NoSuchKernel(kernel_name)
E           jupyter_client.kernelspec.NoSuchKernel: No such kernel named python3

/usr/lib/python3.8/site-packages/jupyter_client/kernelspec.py:294: NoSuchKernel

The above exception was the direct cause of the following exception:

    def test_runrole_doctrees():
        # Test that run roles generate expected doctrees
        expected_re_fmt = """\
    <document source=".*?">
        <paragraph>
            Text then
            <runrole_reference filename="{filebase}.{ext}" refdoc="contents" reftarget="{base}.{ext}" reftype="{role_type}">
                {descr}
             then text."""

        def assert_rst_pxml(pxml_params, rst_source):
            code_type = pxml_params['code_type']
            pxml = to_pxml.from_rst(rst_source)
            if not 'ext' in pxml_params:
                pxml_params['ext'] = 'py' if code_type == 'pyfile' else 'ipynb'
            pxml_regex = expected_re_fmt.format(
                role_type=code_type,
                **pxml_params)
            assert re.match(pxml_regex, pxml)

        assert_rst_pxml(
            dict(code_type='clearnotebook',
                 filebase='contents',
                 base='/contents',
                 descr=r'Download this page as a Jupyter notebook \(no outputs\)'),
            "Text then :clearnotebook:`.` then text.")
>       assert_rst_pxml(
            dict(code_type='fullnotebook',
                 filebase='contents',
                 base='/contents',
                 descr=('Download this page as a Jupyter notebook '
                        r'\(with outputs\)')),
            "Text then :fullnotebook:`.` then text.")

nb2plots/tests/test_runroles.py:77:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
nb2plots/tests/test_runroles.py:63: in assert_rst_pxml
    pxml = to_pxml.from_rst(rst_source)
nb2plots/converters.py:124: in from_rst
    doctree, app = self._build_rst(rst_text, resolve)
nb2plots/converters.py:84: in _build_rst
    app.build(True, [])
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:112: in build
    return super(TestApp, self).build(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/application.py:367: in build
    self.events.emit('build-finished', None)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <sphinx.events.EventManager object at 0x7f72f9bc49d0>, name = 'build-finished', allowed_exceptions = (), args = (None,), results = []
listeners = [EventListener(id=68, handler=<function write_runfiles at 0x7f7305d41700>, priority=500)]

    def emit(self, name: str, *args: Any,
             allowed_exceptions: Tuple[Type[Exception], ...] = ()) -> List:
        """Emit a Sphinx event."""
        try:
            logger.debug('[app] emitting event: %r%s', name, repr(args)[:100])
        except Exception:
            # not every object likes to be repr()'d (think
            # random stuff coming via autodoc)
            pass

        results = []
        listeners = sorted(self.listeners[name], key=attrgetter("priority"))
        for listener in listeners:
            try:
                results.append(listener.handler(self.app, *args))
            except allowed_exceptions:
                # pass through the errors specified as *allowed_exceptions*
                raise
            except SphinxError:
                raise
            except Exception as exc:
                modname = safe_getattr(listener.handler, '__module__', None)
>               raise ExtensionError(__("Handler %r for event %r threw an exception") %
                                     (listener.handler, name), exc, modname=modname) from exc
E               sphinx.errors.ExtensionError: Handler <function write_runfiles at 0x7f7305d41700> for event 'build-finished' threw an exception (exception: No such kernel named python3)

/usr/lib/python3.8/site-packages/sphinx/events.py:102: ExtensionError
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
Running Sphinx v4.5.0
making output directory... done
building [mo]: all of 0 po files
building [pseudoxml]: all source files
updating environment: [new config] 1 added, 0 changed, 0 removed
reading sources... [100%] contents
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] contents
build succeeded.

The pseudo-XML files are in ../../../../../tmp/tmpda93477o/build.
Running Sphinx v4.5.0
making output directory... done
building [mo]: all of 0 po files
building [pseudoxml]: all source files
updating environment: [new config] 1 added, 0 changed, 0 removed
reading sources... [100%] contents
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] contents
build succeeded.

The pseudo-XML files are in ../../../../../tmp/tmpsvi10ye3/build.
---------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------
WARNING  traitlets:kernelspec.py:293 Kernelspec name python3 cannot be found!
ERROR    traitlets:manager.py:82 No such kernel named python3
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 75, in wrapper
    out = await method(self, *args, **kwargs)
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 383, in _async_start_kernel
    kernel_cmd, kw = await ensure_async(self.pre_start_kernel(**kw))
  File "/usr/lib/python3.8/site-packages/jupyter_client/utils.py", line 38, in ensure_async
    return await obj
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 346, in _async_pre_start_kernel
    self.kernel_spec,
  File "/usr/lib/python3.8/site-packages/jupyter_client/manager.py", line 176, in kernel_spec
    self._kernel_spec = self.kernel_spec_manager.get_kernel_spec(self.kernel_name)
  File "/usr/lib/python3.8/site-packages/jupyter_client/kernelspec.py", line 294, in get_kernel_spec
    raise NoSuchKernel(kernel_name)
jupyter_client.kernelspec.NoSuchKernel: No such kernel named python3
============================================================================= warnings summary =============================================================================
nb2plots/tests/test_proj1.py::TestProj1::test_build_error
nb2plots/tests/test_proj1.py::TestProj1::test_build_error
  /tmp/tmpi6kr898l/source/conf.py:103: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.

nb2plots/tests/test_proj1.py::TestNotSameName::test_build_error
nb2plots/tests/test_proj1.py::TestNotSameName::test_build_error
  /tmp/tmpg_bjj0uo/source/conf.py:103: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.

nb2plots/tests/test_proj1.py::TestSameNameIpy::test_build_error
nb2plots/tests/test_proj1.py::TestSameNameIpy::test_build_error
  /tmp/tmp5t9atf25/source/conf.py:103: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.

nb2plots/tests/test_proj1.py::TestSameNamePy::test_build_error
nb2plots/tests/test_proj1.py::TestSameNamePy::test_build_error
  /tmp/tmppc_d6t87/source/conf.py:103: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
========================================================================= short test summary info ==========================================================================
ERROR nb2plots/tests/test_builders.py::TestMarkdownBuild::test_build_error - RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7f730...
ERROR nb2plots/tests/test_builders.py::TestMarkdownBuild::test_output - RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7f7305d417...
ERROR nb2plots/tests/test_builders.py::TestBasedMarkdownBuild::test_build_error - RuntimeError: page build failed with build error Handler <function write_runfiles at 0x...
ERROR nb2plots/tests/test_builders.py::TestBasedMarkdownBuild::test_output - RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7f730...
ERROR nb2plots/tests/test_builders.py::TestLatexBuild::test_build_error - RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7f7305d4...
ERROR nb2plots/tests/test_builders.py::TestLatexBuild::test_output - RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7f7305d41700>...
ERROR nb2plots/tests/test_codelinks.py::TestSubdirCodeLinks::test_build_error - RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7f...
ERROR nb2plots/tests/test_codelinks.py::TestSubdirCodeLinks::test_output - RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7f7305d...
ERROR nb2plots/tests/test_nbplots.py::TestClearNotebook::test_build_error - RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7f7305...
ERROR nb2plots/tests/test_nbplots.py::TestClearNotebook::test_pages - RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7f7305d41700...
ERROR nb2plots/tests/test_proj1.py::TestProj1::test_build_error - RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7f7305d41700> fo...
ERROR nb2plots/tests/test_proj1.py::TestProj1::test_basic_build - RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7f7305d41700> fo...
ERROR nb2plots/tests/test_proj1.py::TestNotSameName::test_build_error - RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7f7305d417...
ERROR nb2plots/tests/test_runroles.py::TestDuplicatesOK::test_build_error - RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7f7305...
ERROR nb2plots/tests/test_runroles.py::TestDuplicatesOK::test_output - RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7f7305d4170...
ERROR nb2plots/tests/test_timeout.py::TestNoTimeout::test_build_error - RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7f7305d417...
ERROR nb2plots/tests/test_timeout.py::TestNoTimeout::test_output - RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7f7305d41700> f...
ERROR nb2plots/tests/test_timeout.py::TestConfigCLTimeout::test_build_error - RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7f73...
ERROR nb2plots/tests/test_timeout.py::TestConfigCLTimeout::test_output - RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7f7305d41...
ERROR nb2plots/tests/test_timeout.py::TestBestTimeout::test_build_error - RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7f7305d4...
ERROR nb2plots/tests/test_timeout.py::TestBestTimeout::test_output - RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7f7305d41700>...
FAILED nb2plots/tests/test_codelinks.py::test_codelinks - sphinx.errors.ExtensionError: Handler <function write_runfiles at 0x7f7305d41700> for event 'build-finished' th...
FAILED nb2plots/tests/test_doctree2nb.py::test_runrole_reference - sphinx.errors.ExtensionError: Handler <function write_runfiles at 0x7f7305d41700> for event 'build-fin...
FAILED nb2plots/tests/test_runroles.py::test_runrole_doctrees - sphinx.errors.ExtensionError: Handler <function write_runfiles at 0x7f7305d41700> for event 'build-finish...
===================================================== 3 failed, 93 passed, 8 warnings, 21 errors in 161.14s (0:02:41) ======================================================

@kloczek
Copy link
Author

kloczek commented May 22, 2022

I've added all those problematic units to 00deselect list so temporary I have a solution.

@kloczek
Copy link
Author

kloczek commented Jul 4, 2023

Just tested 0.6.1 and looks like pytest is now passing however there are some warnings
Here is pytest output:

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-nb2plots-0.6.1-7.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-nb2plots-0.6.1-7.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network'
============================= test session starts ==============================
platform linux -- Python 3.8.17, pytest-7.4.0, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/nb2plots-0.6.1
collected 117 items

nb2plots/tests/test_builders.py ..........                               [  8%]
nb2plots/tests/test_codelinks.py ...                                     [ 11%]
nb2plots/tests/test_config.py .                                          [ 11%]
nb2plots/tests/test_converters.py .                                      [ 12%]
nb2plots/tests/test_doctree2md.py .....                                  [ 17%]
nb2plots/tests/test_doctree2nb.py ........                               [ 23%]
nb2plots/tests/test_doctree2py.py ..                                     [ 25%]
nb2plots/tests/test_from_notebook.py ......                              [ 30%]
nb2plots/tests/test_mpl_interactive.py .                                 [ 31%]
nb2plots/tests/test_nbplots.py ......................................... [ 66%]
......                                                                   [ 71%]
nb2plots/tests/test_proj1.py .....                                       [ 76%]
nb2plots/tests/test_regression.py .                                      [ 76%]
nb2plots/tests/test_runroles.py ..........                               [ 85%]
nb2plots/tests/test_scripts.py .....                                     [ 89%]
nb2plots/tests/test_sphinx2md.py ..                                      [ 91%]
nb2plots/tests/test_strdiff.py .                                         [ 92%]
nb2plots/tests/test_timeout.py .........                                 [100%]

=============================== warnings summary ===============================
../../../../../usr/lib/python3.8/site-packages/jupyter_client/connect.py:20
  /usr/lib/python3.8/site-packages/jupyter_client/connect.py:20: DeprecationWarning: Jupyter is migrating its paths to use standard platformdirs
  given by the platformdirs library.  To remove this warning and
  see the appropriate new directories, set the environment variable
  `JUPYTER_PLATFORM_DIRS=1` and then run `jupyter --paths`.
  The use of platformdirs will be the default in `jupyter_core` v6
    from jupyter_core.paths import jupyter_data_dir, jupyter_runtime_dir, secure_write

nb2plots/tests/test_builders.py::TestMarkdownBuild::test_build_error
nb2plots/tests/test_builders.py::TestMarkdownBuild::test_build_error
  /usr/lib/python3.8/site-packages/sphinxcontrib/htmlhelp/__init__.py:26: RemovedInSphinx80Warning: The alias 'sphinx.util.progress_message' is deprecated, use 'sphinx.http_date.epoch_to_rfc1123' instead. Check CHANGES for Sphinx API modifications.
    from sphinx.util import progress_message

nb2plots/tests/test_builders.py: 2 warnings
nb2plots/tests/test_sphinx2md.py: 20 warnings
  /usr/lib/python3.8/site-packages/sphinx/application.py:335: RemovedInSphinx70Warning: The custom builder markdown defines a custom __init__ method without the 'env'argument. Report this bug to the developers of your custom builder, this is likely not a issue with Sphinx. The 'env' argument will be required from Sphinx 7.
    return self.registry.create_builder(self, name, self.env)

nb2plots/tests/test_builders.py: 10 warnings
nb2plots/tests/test_codelinks.py: 10 warnings
nb2plots/tests/test_doctree2nb.py: 34 warnings
nb2plots/tests/test_doctree2py.py: 19 warnings
nb2plots/tests/test_nbplots.py: 1 warning
nb2plots/tests/test_proj1.py: 3 warnings
nb2plots/tests/test_regression.py: 2 warnings
nb2plots/tests/test_runroles.py: 16 warnings
nb2plots/tests/test_sphinx2md.py: 20 warnings
nb2plots/tests/test_timeout.py: 8 warnings
  /home/tkloczko/rpmbuild/BUILD/nb2plots-0.6.1/nb2plots/sphinx2foos.py:18: RemovedInSphinx70Warning: The 'env' argument to Builder will be required from Sphinx 7.
    super(MarkdownBuilder, self).__init__(app)

nb2plots/tests/test_builders.py: 4 warnings
nb2plots/tests/test_doctree2nb.py: 32 warnings
nb2plots/tests/test_doctree2py.py: 19 warnings
nb2plots/tests/test_regression.py: 2 warnings
nb2plots/tests/test_sphinx2md.py: 20 warnings
  /usr/lib/python3.8/site-packages/sphinx/registry.py:169: RemovedInSphinx70Warning: Builder.set_environment is deprecated, pass env to 'Builder.__init__()' instead.
    builder.set_environment(env)

nb2plots/tests/test_builders.py: 19 warnings
nb2plots/tests/test_codelinks.py: 17 warnings
nb2plots/tests/test_doctree2nb.py: 66 warnings
nb2plots/tests/test_doctree2py.py: 38 warnings
nb2plots/tests/test_mpl_interactive.py: 4 warnings
nb2plots/tests/test_nbplots.py: 46 warnings
nb2plots/tests/test_proj1.py: 9 warnings
nb2plots/tests/test_regression.py: 4 warnings
nb2plots/tests/test_runroles.py: 47 warnings
nb2plots/tests/test_sphinx2md.py: 40 warnings
nb2plots/tests/test_timeout.py: 20 warnings
  /home/tkloczko/rpmbuild/BUILD/nb2plots-0.6.1/nb2plots/runroles.py:269: PendingDeprecationWarning: nodes.Node.traverse() is obsoleted by Node.findall().
    for ref in doctree.traverse(runrole_reference):

nb2plots/tests/test_builders.py: 2 warnings
nb2plots/tests/test_doctree2py.py: 19 warnings
nb2plots/tests/test_regression.py: 1 warning
  /usr/lib/python3.8/site-packages/sphinx/application.py:335: RemovedInSphinx70Warning: The custom builder python defines a custom __init__ method without the 'env'argument. Report this bug to the developers of your custom builder, this is likely not a issue with Sphinx. The 'env' argument will be required from Sphinx 7.
    return self.registry.create_builder(self, name, self.env)

nb2plots/tests/test_doctree2nb.py: 32 warnings
nb2plots/tests/test_regression.py: 1 warning
  /usr/lib/python3.8/site-packages/sphinx/application.py:335: RemovedInSphinx70Warning: The custom builder jupyter defines a custom __init__ method without the 'env'argument. Report this bug to the developers of your custom builder, this is likely not a issue with Sphinx. The 'env' argument will be required from Sphinx 7.
    return self.registry.create_builder(self, name, self.env)

nb2plots/tests/test_nbplots.py::TestWithSkip::test_build_error
nb2plots/tests/test_nbplots.py::TestWithSkipStructure::test_build_error
nb2plots/tests/test_nbplots.py::TestWithSkipDoctest::test_build_error
nb2plots/tests/test_nbplots.py::TestHideShow::test_build_error
nb2plots/tests/test_nbplots.py::TestHideShow::test_build_error
nb2plots/tests/test_nbplots.py::TestHideShowTests::test_build_error
nb2plots/tests/test_nbplots.py::TestHideShowTests::test_build_error
nb2plots/tests/test_nbplots.py::TestHideShowHtml::test_build_error
nb2plots/tests/test_nbplots.py::TestHideShowHtml::test_build_error
  /home/tkloczko/rpmbuild/BUILD/nb2plots-0.6.1/nb2plots/nbplots.py:354: PendingDeprecationWarning: nodes.Node.traverse() is obsoleted by Node.findall().
    for node in tree.traverse(doctest_filter):

nb2plots/tests/test_proj1.py::TestProj1::test_build_error
nb2plots/tests/test_proj1.py::TestProj1::test_build_error
  /tmp/tmpky7_8567/source/conf.py:103: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
    if LooseVersion(sphinx.__version__) >= LooseVersion('1.3'):

nb2plots/tests/test_proj1.py::TestNotSameName::test_build_error
nb2plots/tests/test_proj1.py::TestNotSameName::test_build_error
  /tmp/tmpskghjngw/source/conf.py:103: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.

nb2plots/tests/test_proj1.py::TestSameNameIpy::test_build_error
nb2plots/tests/test_proj1.py::TestSameNameIpy::test_build_error
  /tmp/tmpoc5eo2kw/source/conf.py:103: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.

nb2plots/tests/test_proj1.py::TestSameNamePy::test_build_error
nb2plots/tests/test_proj1.py::TestSameNamePy::test_build_error
  /tmp/tmp2pw1lqcm/source/conf.py:103: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.

nb2plots/tests/test_timeout.py::TestCLOptsTimeout::test_build_error
nb2plots/tests/test_timeout.py::TestConfigCLTimeout::test_build_error
nb2plots/tests/test_timeout.py::TestBestTimeout::test_build_error
  /home/tkloczko/rpmbuild/BUILD/nb2plots-0.6.1/nb2plots/codelinks.py:107: PendingDeprecationWarning: nodes.Node.traverse() is obsoleted by Node.findall().
    for node in node.traverse(runrole_reference):

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================ 117 passed, 610 warnings in 198.58s (0:03:18) =================

@kloczek
Copy link
Author

kloczek commented Aug 18, 2023

Just tested 0.6.1 + master and now again pytest is failing
Here is pytest output:

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-nb2plots-0.6.1-8.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-nb2plots-0.6.1-8.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network'
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.17, pytest-7.4.0, pluggy-1.2.0
rootdir: /home/tkloczko/rpmbuild/BUILD/nb2plots-0.6.1
collected 117 items

nb2plots/tests/test_builders.py EEEEEEEEEE                                                                                                                                            [  8%]
nb2plots/tests/test_codelinks.py FEE                                                                                                                                                  [ 11%]
nb2plots/tests/test_config.py .                                                                                                                                                       [ 11%]
nb2plots/tests/test_converters.py .                                                                                                                                                   [ 12%]
nb2plots/tests/test_doctree2md.py .....                                                                                                                                               [ 17%]
nb2plots/tests/test_doctree2nb.py FFFFFFFF                                                                                                                                            [ 23%]
nb2plots/tests/test_doctree2py.py .F                                                                                                                                                  [ 25%]
nb2plots/tests/test_from_notebook.py ......                                                                                                                                           [ 30%]
nb2plots/tests/test_mpl_interactive.py .                                                                                                                                              [ 31%]
nb2plots/tests/test_nbplots.py ......................................EE.......                                                                                                        [ 71%]
nb2plots/tests/test_proj1.py EEE..                                                                                                                                                    [ 76%]
nb2plots/tests/test_regression.py F                                                                                                                                                   [ 76%]
nb2plots/tests/test_runroles.py ..FEEEEEE.                                                                                                                                            [ 85%]
nb2plots/tests/test_scripts.py .FFFF                                                                                                                                                  [ 89%]
nb2plots/tests/test_sphinx2md.py FF                                                                                                                                                   [ 91%]
nb2plots/tests/test_strdiff.py .                                                                                                                                                      [ 92%]
nb2plots/tests/test_timeout.py EE...EEEE                                                                                                                                              [100%]

========================================================================================== ERRORS ===========================================================================================
___________________________________________________________________ ERROR at setup of TestMarkdownBuild.test_build_error ____________________________________________________________________

cls = <class 'nb2plots.tests.test_builders.TestMarkdownBuild'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
>           raise e

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:222:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:213: in setup_class
    cls.build_app = TestApp(
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:64: in __init__
    super(TestApp, self).__init__(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/application.py:262: in __init__
    self.builder = self.create_builder(buildername)
/usr/lib/python3.8/site-packages/sphinx/application.py:335: in create_builder
    return self.registry.create_builder(self, name, self.env)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <sphinx.registry.SphinxComponentRegistry object at 0x7fba05b4c970>, app = <sphinxtesters.sphinxutils.TestApp object at 0x7fba05b4c940>, name = 'markdown'
env = <sphinx.environment.BuildEnvironment object at 0x7fba05c83580>

    def create_builder(self, app: Sphinx, name: str,
                       env: BuildEnvironment | None = None) -> Builder:
        if name not in self.builders:
            raise SphinxError(__('Builder name %s not registered') % name)

>       return self.builders[name](app, env)
E       TypeError: __init__() takes 2 positional arguments but 3 were given

/usr/lib/python3.8/site-packages/sphinx/registry.py:157: TypeError
----------------------------------------------------------------------------------- Captured stdout setup -----------------------------------------------------------------------------------
Running Sphinx v7.0.1
making output directory... done
______________________________________________________________________ ERROR at setup of TestMarkdownBuild.test_output ______________________________________________________________________

cls = <class 'nb2plots.tests.test_builders.TestMarkdownBuild'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
>           raise e

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:222:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:213: in setup_class
    cls.build_app = TestApp(
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:64: in __init__
    super(TestApp, self).__init__(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/application.py:262: in __init__
    self.builder = self.create_builder(buildername)
/usr/lib/python3.8/site-packages/sphinx/application.py:335: in create_builder
    return self.registry.create_builder(self, name, self.env)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <sphinx.registry.SphinxComponentRegistry object at 0x7fba05b4c970>, app = <sphinxtesters.sphinxutils.TestApp object at 0x7fba05b4c940>, name = 'markdown'
env = <sphinx.environment.BuildEnvironment object at 0x7fba05c83580>

    def create_builder(self, app: Sphinx, name: str,
                       env: BuildEnvironment | None = None) -> Builder:
        if name not in self.builders:
            raise SphinxError(__('Builder name %s not registered') % name)

>       return self.builders[name](app, env)
E       TypeError: __init__() takes 2 positional arguments but 3 were given

/usr/lib/python3.8/site-packages/sphinx/registry.py:157: TypeError
_________________________________________________________________ ERROR at setup of TestBasedMarkdownBuild.test_build_error _________________________________________________________________

cls = <class 'nb2plots.tests.test_builders.TestBasedMarkdownBuild'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
>           raise e

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:222:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:213: in setup_class
    cls.build_app = TestApp(
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:64: in __init__
    super(TestApp, self).__init__(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/application.py:262: in __init__
    self.builder = self.create_builder(buildername)
/usr/lib/python3.8/site-packages/sphinx/application.py:335: in create_builder
    return self.registry.create_builder(self, name, self.env)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <sphinx.registry.SphinxComponentRegistry object at 0x7fba057aca00>, app = <sphinxtesters.sphinxutils.TestApp object at 0x7fba057acd90>, name = 'markdown'
env = <sphinx.environment.BuildEnvironment object at 0x7fba057acfa0>

    def create_builder(self, app: Sphinx, name: str,
                       env: BuildEnvironment | None = None) -> Builder:
        if name not in self.builders:
            raise SphinxError(__('Builder name %s not registered') % name)

>       return self.builders[name](app, env)
E       TypeError: __init__() takes 2 positional arguments but 3 were given

/usr/lib/python3.8/site-packages/sphinx/registry.py:157: TypeError
----------------------------------------------------------------------------------- Captured stdout setup -----------------------------------------------------------------------------------
Running Sphinx v7.0.1
making output directory... done
___________________________________________________________________ ERROR at setup of TestBasedMarkdownBuild.test_output ____________________________________________________________________

cls = <class 'nb2plots.tests.test_builders.TestBasedMarkdownBuild'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
>           raise e

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:222:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:213: in setup_class
    cls.build_app = TestApp(
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:64: in __init__
    super(TestApp, self).__init__(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/application.py:262: in __init__
    self.builder = self.create_builder(buildername)
/usr/lib/python3.8/site-packages/sphinx/application.py:335: in create_builder
    return self.registry.create_builder(self, name, self.env)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <sphinx.registry.SphinxComponentRegistry object at 0x7fba057aca00>, app = <sphinxtesters.sphinxutils.TestApp object at 0x7fba057acd90>, name = 'markdown'
env = <sphinx.environment.BuildEnvironment object at 0x7fba057acfa0>

    def create_builder(self, app: Sphinx, name: str,
                       env: BuildEnvironment | None = None) -> Builder:
        if name not in self.builders:
            raise SphinxError(__('Builder name %s not registered') % name)

>       return self.builders[name](app, env)
E       TypeError: __init__() takes 2 positional arguments but 3 were given

/usr/lib/python3.8/site-packages/sphinx/registry.py:157: TypeError
____________________________________________________________________ ERROR at setup of TestPythonBuild.test_build_error _____________________________________________________________________

cls = <class 'nb2plots.tests.test_builders.TestPythonBuild'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
>           raise e

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:222:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:213: in setup_class
    cls.build_app = TestApp(
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:64: in __init__
    super(TestApp, self).__init__(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/application.py:262: in __init__
    self.builder = self.create_builder(buildername)
/usr/lib/python3.8/site-packages/sphinx/application.py:335: in create_builder
    return self.registry.create_builder(self, name, self.env)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <sphinx.registry.SphinxComponentRegistry object at 0x7fba05c839a0>, app = <sphinxtesters.sphinxutils.TestApp object at 0x7fba05c83eb0>, name = 'python'
env = <sphinx.environment.BuildEnvironment object at 0x7fba05c51910>

    def create_builder(self, app: Sphinx, name: str,
                       env: BuildEnvironment | None = None) -> Builder:
        if name not in self.builders:
            raise SphinxError(__('Builder name %s not registered') % name)

>       return self.builders[name](app, env)
E       TypeError: __init__() takes 2 positional arguments but 3 were given

/usr/lib/python3.8/site-packages/sphinx/registry.py:157: TypeError
----------------------------------------------------------------------------------- Captured stdout setup -----------------------------------------------------------------------------------
Running Sphinx v7.0.1
making output directory... done
_______________________________________________________________________ ERROR at setup of TestPythonBuild.test_output _______________________________________________________________________

cls = <class 'nb2plots.tests.test_builders.TestPythonBuild'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
>           raise e

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:222:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:213: in setup_class
    cls.build_app = TestApp(
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:64: in __init__
    super(TestApp, self).__init__(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/application.py:262: in __init__
    self.builder = self.create_builder(buildername)
/usr/lib/python3.8/site-packages/sphinx/application.py:335: in create_builder
    return self.registry.create_builder(self, name, self.env)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <sphinx.registry.SphinxComponentRegistry object at 0x7fba05c839a0>, app = <sphinxtesters.sphinxutils.TestApp object at 0x7fba05c83eb0>, name = 'python'
env = <sphinx.environment.BuildEnvironment object at 0x7fba05c51910>

    def create_builder(self, app: Sphinx, name: str,
                       env: BuildEnvironment | None = None) -> Builder:
        if name not in self.builders:
            raise SphinxError(__('Builder name %s not registered') % name)

>       return self.builders[name](app, env)
E       TypeError: __init__() takes 2 positional arguments but 3 were given

/usr/lib/python3.8/site-packages/sphinx/registry.py:157: TypeError
__________________________________________________________________ ERROR at setup of TestBasedPythonBuild.test_build_error __________________________________________________________________

cls = <class 'nb2plots.tests.test_builders.TestBasedPythonBuild'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
>           raise e

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:222:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:213: in setup_class
    cls.build_app = TestApp(
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:64: in __init__
    super(TestApp, self).__init__(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/application.py:262: in __init__
    self.builder = self.create_builder(buildername)
/usr/lib/python3.8/site-packages/sphinx/application.py:335: in create_builder
    return self.registry.create_builder(self, name, self.env)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <sphinx.registry.SphinxComponentRegistry object at 0x7fba056161f0>, app = <sphinxtesters.sphinxutils.TestApp object at 0x7fba056166d0>, name = 'python'
env = <sphinx.environment.BuildEnvironment object at 0x7fba05616b50>

    def create_builder(self, app: Sphinx, name: str,
                       env: BuildEnvironment | None = None) -> Builder:
        if name not in self.builders:
            raise SphinxError(__('Builder name %s not registered') % name)

>       return self.builders[name](app, env)
E       TypeError: __init__() takes 2 positional arguments but 3 were given

/usr/lib/python3.8/site-packages/sphinx/registry.py:157: TypeError
----------------------------------------------------------------------------------- Captured stdout setup -----------------------------------------------------------------------------------
Running Sphinx v7.0.1
making output directory... done
____________________________________________________________________ ERROR at setup of TestBasedPythonBuild.test_output _____________________________________________________________________

cls = <class 'nb2plots.tests.test_builders.TestBasedPythonBuild'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
>           raise e

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:222:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:213: in setup_class
    cls.build_app = TestApp(
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:64: in __init__
    super(TestApp, self).__init__(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/application.py:262: in __init__
    self.builder = self.create_builder(buildername)
/usr/lib/python3.8/site-packages/sphinx/application.py:335: in create_builder
    return self.registry.create_builder(self, name, self.env)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <sphinx.registry.SphinxComponentRegistry object at 0x7fba056161f0>, app = <sphinxtesters.sphinxutils.TestApp object at 0x7fba056166d0>, name = 'python'
env = <sphinx.environment.BuildEnvironment object at 0x7fba05616b50>

    def create_builder(self, app: Sphinx, name: str,
                       env: BuildEnvironment | None = None) -> Builder:
        if name not in self.builders:
            raise SphinxError(__('Builder name %s not registered') % name)

>       return self.builders[name](app, env)
E       TypeError: __init__() takes 2 positional arguments but 3 were given

/usr/lib/python3.8/site-packages/sphinx/registry.py:157: TypeError
_____________________________________________________________________ ERROR at setup of TestLatexBuild.test_build_error _____________________________________________________________________

cls = <class 'nb2plots.tests.test_builders.TestLatexBuild'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
            raise e
>       cls.build_source()

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:223:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'nb2plots.tests.test_builders.TestLatexBuild'>

    @classmethod
    def build_source(cls):
        try:  # Catch exceptions during sphinx build
            cls.build_app.build(False, [])
            if cls.build_app.statuscode != 0:
                cls.build_error = "Unknown error"
        except Exception as e:  # Exceptions during sphinx build
            cls.build_error = e
        # We will later check if a page build that should error, did error
        if cls.build_error is None or cls.should_error:
            return
        # An unexpected error - delete temp dir and report.
        shutil.rmtree(cls.build_path)
>       raise RuntimeError('page build failed with build error {}'
                           .format(cls.build_error))
E       RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 required positional argument: 'env')

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:254: RuntimeError
----------------------------------------------------------------------------------- Captured stdout setup -----------------------------------------------------------------------------------
Running Sphinx v7.0.1
making output directory... done
building [mo]: targets for 0 po files that are out of date
writing output...
building [latex]: all documents
updating environment: [new config] 2 added, 0 changed, 0 removed
reading sources... [100%] foo/a_page
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
processing python.tex... contents foo/a_page
resolving references...
done
writing... done
copying TeX support files... copying TeX support files...
done
_______________________________________________________________________ ERROR at setup of TestLatexBuild.test_output ________________________________________________________________________

cls = <class 'nb2plots.tests.test_builders.TestLatexBuild'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
            raise e
>       cls.build_source()

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:223:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'nb2plots.tests.test_builders.TestLatexBuild'>

    @classmethod
    def build_source(cls):
        try:  # Catch exceptions during sphinx build
            cls.build_app.build(False, [])
            if cls.build_app.statuscode != 0:
                cls.build_error = "Unknown error"
        except Exception as e:  # Exceptions during sphinx build
            cls.build_error = e
        # We will later check if a page build that should error, did error
        if cls.build_error is None or cls.should_error:
            return
        # An unexpected error - delete temp dir and report.
        shutil.rmtree(cls.build_path)
>       raise RuntimeError('page build failed with build error {}'
                           .format(cls.build_error))
E       RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 required positional argument: 'env')

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:254: RuntimeError
__________________________________________________________________ ERROR at setup of TestSubdirCodeLinks.test_build_error ___________________________________________________________________

cls = <class 'nb2plots.tests.test_codelinks.TestSubdirCodeLinks'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
            raise e
>       cls.build_source()

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:223:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'nb2plots.tests.test_codelinks.TestSubdirCodeLinks'>

    @classmethod
    def build_source(cls):
        try:  # Catch exceptions during sphinx build
            cls.build_app.build(False, [])
            if cls.build_app.statuscode != 0:
                cls.build_error = "Unknown error"
        except Exception as e:  # Exceptions during sphinx build
            cls.build_error = e
        # We will later check if a page build that should error, did error
        if cls.build_error is None or cls.should_error:
            return
        # An unexpected error - delete temp dir and report.
        shutil.rmtree(cls.build_path)
>       raise RuntimeError('page build failed with build error {}'
                           .format(cls.build_error))
E       RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 required positional argument: 'env')

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:254: RuntimeError
----------------------------------------------------------------------------------- Captured stdout setup -----------------------------------------------------------------------------------
Running Sphinx v7.0.1
making output directory... done
building [mo]: targets for 0 po files that are out of date
writing output...
building [html]: targets for 2 source files that are out of date
updating environment: [new config] 2 added, 0 changed, 0 removed
reading sources... [100%] foo/a_page
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] foo/a_page
generating indices... genindex done
writing additional pages... search done
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
_____________________________________________________________________ ERROR at setup of TestSubdirCodeLinks.test_output _____________________________________________________________________

cls = <class 'nb2plots.tests.test_codelinks.TestSubdirCodeLinks'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
            raise e
>       cls.build_source()

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:223:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'nb2plots.tests.test_codelinks.TestSubdirCodeLinks'>

    @classmethod
    def build_source(cls):
        try:  # Catch exceptions during sphinx build
            cls.build_app.build(False, [])
            if cls.build_app.statuscode != 0:
                cls.build_error = "Unknown error"
        except Exception as e:  # Exceptions during sphinx build
            cls.build_error = e
        # We will later check if a page build that should error, did error
        if cls.build_error is None or cls.should_error:
            return
        # An unexpected error - delete temp dir and report.
        shutil.rmtree(cls.build_path)
>       raise RuntimeError('page build failed with build error {}'
                           .format(cls.build_error))
E       RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 required positional argument: 'env')

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:254: RuntimeError
___________________________________________________________________ ERROR at setup of TestClearNotebook.test_build_error ____________________________________________________________________

cls = <class 'nb2plots.tests.test_nbplots.TestClearNotebook'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
            raise e
>       cls.build_source()

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:223:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'nb2plots.tests.test_nbplots.TestClearNotebook'>

    @classmethod
    def build_source(cls):
        try:  # Catch exceptions during sphinx build
            cls.build_app.build(False, [])
            if cls.build_app.statuscode != 0:
                cls.build_error = "Unknown error"
        except Exception as e:  # Exceptions during sphinx build
            cls.build_error = e
        # We will later check if a page build that should error, did error
        if cls.build_error is None or cls.should_error:
            return
        # An unexpected error - delete temp dir and report.
        shutil.rmtree(cls.build_path)
>       raise RuntimeError('page build failed with build error {}'
                           .format(cls.build_error))
E       RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 required positional argument: 'env')

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:254: RuntimeError
----------------------------------------------------------------------------------- Captured stdout setup -----------------------------------------------------------------------------------
Running Sphinx v7.0.1
making output directory... done
building [mo]: targets for 0 po files that are out of date
writing output...
building [text]: targets for 2 source files that are out of date
updating environment: [new config] 2 added, 0 changed, 0 removed
reading sources... [100%] contents
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] contents
______________________________________________________________________ ERROR at setup of TestClearNotebook.test_pages _______________________________________________________________________

cls = <class 'nb2plots.tests.test_nbplots.TestClearNotebook'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
            raise e
>       cls.build_source()

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:223:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'nb2plots.tests.test_nbplots.TestClearNotebook'>

    @classmethod
    def build_source(cls):
        try:  # Catch exceptions during sphinx build
            cls.build_app.build(False, [])
            if cls.build_app.statuscode != 0:
                cls.build_error = "Unknown error"
        except Exception as e:  # Exceptions during sphinx build
            cls.build_error = e
        # We will later check if a page build that should error, did error
        if cls.build_error is None or cls.should_error:
            return
        # An unexpected error - delete temp dir and report.
        shutil.rmtree(cls.build_path)
>       raise RuntimeError('page build failed with build error {}'
                           .format(cls.build_error))
E       RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 required positional argument: 'env')

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:254: RuntimeError
_______________________________________________________________________ ERROR at setup of TestProj1.test_build_error ________________________________________________________________________

cls = <class 'nb2plots.tests.test_proj1.TestProj1'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
            raise e
>       cls.build_source()

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:223:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'nb2plots.tests.test_proj1.TestProj1'>

    @classmethod
    def build_source(cls):
        try:  # Catch exceptions during sphinx build
            cls.build_app.build(False, [])
            if cls.build_app.statuscode != 0:
                cls.build_error = "Unknown error"
        except Exception as e:  # Exceptions during sphinx build
            cls.build_error = e
        # We will later check if a page build that should error, did error
        if cls.build_error is None or cls.should_error:
            return
        # An unexpected error - delete temp dir and report.
        shutil.rmtree(cls.build_path)
>       raise RuntimeError('page build failed with build error {}'
                           .format(cls.build_error))
E       RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 required positional argument: 'env')

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:254: RuntimeError
----------------------------------------------------------------------------------- Captured stdout setup -----------------------------------------------------------------------------------
Running Sphinx v7.0.1
making output directory... done
building [mo]: targets for 0 po files that are out of date
writing output...
building [html]: targets for 2 source files that are out of date
updating environment: [new config] 2 added, 0 changed, 0 removed
reading sources... [100%] index
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] index
generating indices... genindex done
writing additional pages... search done
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
_______________________________________________________________________ ERROR at setup of TestProj1.test_basic_build ________________________________________________________________________

cls = <class 'nb2plots.tests.test_proj1.TestProj1'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
            raise e
>       cls.build_source()

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:223:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'nb2plots.tests.test_proj1.TestProj1'>

    @classmethod
    def build_source(cls):
        try:  # Catch exceptions during sphinx build
            cls.build_app.build(False, [])
            if cls.build_app.statuscode != 0:
                cls.build_error = "Unknown error"
        except Exception as e:  # Exceptions during sphinx build
            cls.build_error = e
        # We will later check if a page build that should error, did error
        if cls.build_error is None or cls.should_error:
            return
        # An unexpected error - delete temp dir and report.
        shutil.rmtree(cls.build_path)
>       raise RuntimeError('page build failed with build error {}'
                           .format(cls.build_error))
E       RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 required positional argument: 'env')

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:254: RuntimeError
____________________________________________________________________ ERROR at setup of TestNotSameName.test_build_error _____________________________________________________________________

cls = <class 'nb2plots.tests.test_proj1.TestNotSameName'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
            raise e
>       cls.build_source()

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:223:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'nb2plots.tests.test_proj1.TestNotSameName'>

    @classmethod
    def build_source(cls):
        try:  # Catch exceptions during sphinx build
            cls.build_app.build(False, [])
            if cls.build_app.statuscode != 0:
                cls.build_error = "Unknown error"
        except Exception as e:  # Exceptions during sphinx build
            cls.build_error = e
        # We will later check if a page build that should error, did error
        if cls.build_error is None or cls.should_error:
            return
        # An unexpected error - delete temp dir and report.
        shutil.rmtree(cls.build_path)
>       raise RuntimeError('page build failed with build error {}'
                           .format(cls.build_error))
E       RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 required positional argument: 'env')

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:254: RuntimeError
----------------------------------------------------------------------------------- Captured stdout setup -----------------------------------------------------------------------------------
Running Sphinx v7.0.1
making output directory... done
building [mo]: targets for 0 po files that are out of date
writing output...
building [html]: targets for 2 source files that are out of date
updating environment: [new config] 2 added, 0 changed, 0 removed
reading sources... [100%] index
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] index
generating indices... genindex done
writing additional pages... search done
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
____________________________________________________________________ ERROR at setup of TestSubdirBuild.test_build_error _____________________________________________________________________

cls = <class 'nb2plots.tests.test_runroles.TestSubdirBuild'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
            raise e
>       cls.build_source()

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:223:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'nb2plots.tests.test_runroles.TestSubdirBuild'>

    @classmethod
    def build_source(cls):
        try:  # Catch exceptions during sphinx build
            cls.build_app.build(False, [])
            if cls.build_app.statuscode != 0:
                cls.build_error = "Unknown error"
        except Exception as e:  # Exceptions during sphinx build
            cls.build_error = e
        # We will later check if a page build that should error, did error
        if cls.build_error is None or cls.should_error:
            return
        # An unexpected error - delete temp dir and report.
        shutil.rmtree(cls.build_path)
>       raise RuntimeError('page build failed with build error {}'
                           .format(cls.build_error))
E       RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 required positional argument: 'env')

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:254: RuntimeError
----------------------------------------------------------------------------------- Captured stdout setup -----------------------------------------------------------------------------------
Running Sphinx v7.0.1
making output directory... done
building [mo]: targets for 0 po files that are out of date
writing output...
building [html]: targets for 2 source files that are out of date
updating environment: [new config] 2 added, 0 changed, 0 removed
reading sources... [100%] foo/a_page
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] foo/a_page
generating indices... genindex done
writing additional pages... search done
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
_______________________________________________________________________ ERROR at setup of TestSubdirBuild.test_output _______________________________________________________________________

cls = <class 'nb2plots.tests.test_runroles.TestSubdirBuild'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
            raise e
>       cls.build_source()

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:223:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'nb2plots.tests.test_runroles.TestSubdirBuild'>

    @classmethod
    def build_source(cls):
        try:  # Catch exceptions during sphinx build
            cls.build_app.build(False, [])
            if cls.build_app.statuscode != 0:
                cls.build_error = "Unknown error"
        except Exception as e:  # Exceptions during sphinx build
            cls.build_error = e
        # We will later check if a page build that should error, did error
        if cls.build_error is None or cls.should_error:
            return
        # An unexpected error - delete temp dir and report.
        shutil.rmtree(cls.build_path)
>       raise RuntimeError('page build failed with build error {}'
                           .format(cls.build_error))
E       RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 required positional argument: 'env')

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:254: RuntimeError
____________________________________________________________________ ERROR at setup of TestPyfileAlias.test_build_error _____________________________________________________________________

cls = <class 'nb2plots.tests.test_runroles.TestPyfileAlias'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
            raise e
>       cls.build_source()

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:223:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'nb2plots.tests.test_runroles.TestPyfileAlias'>

    @classmethod
    def build_source(cls):
        try:  # Catch exceptions during sphinx build
            cls.build_app.build(False, [])
            if cls.build_app.statuscode != 0:
                cls.build_error = "Unknown error"
        except Exception as e:  # Exceptions during sphinx build
            cls.build_error = e
        # We will later check if a page build that should error, did error
        if cls.build_error is None or cls.should_error:
            return
        # An unexpected error - delete temp dir and report.
        shutil.rmtree(cls.build_path)
>       raise RuntimeError('page build failed with build error {}'
                           .format(cls.build_error))
E       RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 required positional argument: 'env')

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:254: RuntimeError
----------------------------------------------------------------------------------- Captured stdout setup -----------------------------------------------------------------------------------
Running Sphinx v7.0.1
making output directory... done
building [mo]: targets for 0 po files that are out of date
writing output...
building [html]: targets for 2 source files that are out of date
updating environment: [new config] 2 added, 0 changed, 0 removed
reading sources... [100%] contents
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] contents
generating indices... genindex done
writing additional pages... search done
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
_______________________________________________________________________ ERROR at setup of TestPyfileAlias.test_output _______________________________________________________________________

cls = <class 'nb2plots.tests.test_runroles.TestPyfileAlias'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
            raise e
>       cls.build_source()

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:223:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'nb2plots.tests.test_runroles.TestPyfileAlias'>

    @classmethod
    def build_source(cls):
        try:  # Catch exceptions during sphinx build
            cls.build_app.build(False, [])
            if cls.build_app.statuscode != 0:
                cls.build_error = "Unknown error"
        except Exception as e:  # Exceptions during sphinx build
            cls.build_error = e
        # We will later check if a page build that should error, did error
        if cls.build_error is None or cls.should_error:
            return
        # An unexpected error - delete temp dir and report.
        shutil.rmtree(cls.build_path)
>       raise RuntimeError('page build failed with build error {}'
                           .format(cls.build_error))
E       RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 required positional argument: 'env')

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:254: RuntimeError
____________________________________________________________________ ERROR at setup of TestDuplicatesOK.test_build_error ____________________________________________________________________

cls = <class 'nb2plots.tests.test_runroles.TestDuplicatesOK'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
            raise e
>       cls.build_source()

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:223:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'nb2plots.tests.test_runroles.TestDuplicatesOK'>

    @classmethod
    def build_source(cls):
        try:  # Catch exceptions during sphinx build
            cls.build_app.build(False, [])
            if cls.build_app.statuscode != 0:
                cls.build_error = "Unknown error"
        except Exception as e:  # Exceptions during sphinx build
            cls.build_error = e
        # We will later check if a page build that should error, did error
        if cls.build_error is None or cls.should_error:
            return
        # An unexpected error - delete temp dir and report.
        shutil.rmtree(cls.build_path)
>       raise RuntimeError('page build failed with build error {}'
                           .format(cls.build_error))
E       RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 required positional argument: 'env')

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:254: RuntimeError
----------------------------------------------------------------------------------- Captured stdout setup -----------------------------------------------------------------------------------
Running Sphinx v7.0.1
making output directory... done
building [mo]: targets for 0 po files that are out of date
writing output...
building [html]: targets for 2 source files that are out of date
updating environment: [new config] 2 added, 0 changed, 0 removed
reading sources... [100%] contents
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] contents
generating indices... genindex done
writing additional pages... search done
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
______________________________________________________________________ ERROR at setup of TestDuplicatesOK.test_output _______________________________________________________________________

cls = <class 'nb2plots.tests.test_runroles.TestDuplicatesOK'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
            raise e
>       cls.build_source()

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:223:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'nb2plots.tests.test_runroles.TestDuplicatesOK'>

    @classmethod
    def build_source(cls):
        try:  # Catch exceptions during sphinx build
            cls.build_app.build(False, [])
            if cls.build_app.statuscode != 0:
                cls.build_error = "Unknown error"
        except Exception as e:  # Exceptions during sphinx build
            cls.build_error = e
        # We will later check if a page build that should error, did error
        if cls.build_error is None or cls.should_error:
            return
        # An unexpected error - delete temp dir and report.
        shutil.rmtree(cls.build_path)
>       raise RuntimeError('page build failed with build error {}'
                           .format(cls.build_error))
E       RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 required positional argument: 'env')

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:254: RuntimeError
_____________________________________________________________________ ERROR at setup of TestNoTimeout.test_build_error ______________________________________________________________________

cls = <class 'nb2plots.tests.test_timeout.TestNoTimeout'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
            raise e
>       cls.build_source()

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:223:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'nb2plots.tests.test_timeout.TestNoTimeout'>

    @classmethod
    def build_source(cls):
        try:  # Catch exceptions during sphinx build
            cls.build_app.build(False, [])
            if cls.build_app.statuscode != 0:
                cls.build_error = "Unknown error"
        except Exception as e:  # Exceptions during sphinx build
            cls.build_error = e
        # We will later check if a page build that should error, did error
        if cls.build_error is None or cls.should_error:
            return
        # An unexpected error - delete temp dir and report.
        shutil.rmtree(cls.build_path)
>       raise RuntimeError('page build failed with build error {}'
                           .format(cls.build_error))
E       RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 required positional argument: 'env')

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:254: RuntimeError
----------------------------------------------------------------------------------- Captured stdout setup -----------------------------------------------------------------------------------
Running Sphinx v7.0.1
making output directory... done
building [mo]: targets for 0 po files that are out of date
writing output...
building [html]: targets for 2 source files that are out of date
updating environment: [new config] 2 added, 0 changed, 0 removed
reading sources... [100%] contents
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] contents
generating indices... genindex done
writing additional pages... search done
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
________________________________________________________________________ ERROR at setup of TestNoTimeout.test_output ________________________________________________________________________

cls = <class 'nb2plots.tests.test_timeout.TestNoTimeout'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
            raise e
>       cls.build_source()

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:223:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'nb2plots.tests.test_timeout.TestNoTimeout'>

    @classmethod
    def build_source(cls):
        try:  # Catch exceptions during sphinx build
            cls.build_app.build(False, [])
            if cls.build_app.statuscode != 0:
                cls.build_error = "Unknown error"
        except Exception as e:  # Exceptions during sphinx build
            cls.build_error = e
        # We will later check if a page build that should error, did error
        if cls.build_error is None or cls.should_error:
            return
        # An unexpected error - delete temp dir and report.
        shutil.rmtree(cls.build_path)
>       raise RuntimeError('page build failed with build error {}'
                           .format(cls.build_error))
E       RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 required positional argument: 'env')

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:254: RuntimeError
__________________________________________________________________ ERROR at setup of TestConfigCLTimeout.test_build_error ___________________________________________________________________

cls = <class 'nb2plots.tests.test_timeout.TestConfigCLTimeout'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
            raise e
>       cls.build_source()

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:223:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'nb2plots.tests.test_timeout.TestConfigCLTimeout'>

    @classmethod
    def build_source(cls):
        try:  # Catch exceptions during sphinx build
            cls.build_app.build(False, [])
            if cls.build_app.statuscode != 0:
                cls.build_error = "Unknown error"
        except Exception as e:  # Exceptions during sphinx build
            cls.build_error = e
        # We will later check if a page build that should error, did error
        if cls.build_error is None or cls.should_error:
            return
        # An unexpected error - delete temp dir and report.
        shutil.rmtree(cls.build_path)
>       raise RuntimeError('page build failed with build error {}'
                           .format(cls.build_error))
E       RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 required positional argument: 'env')

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:254: RuntimeError
----------------------------------------------------------------------------------- Captured stdout setup -----------------------------------------------------------------------------------
Running Sphinx v7.0.1
making output directory... done
building [mo]: targets for 0 po files that are out of date
writing output...
building [html]: targets for 2 source files that are out of date
updating environment: [new config] 2 added, 0 changed, 0 removed
reading sources... [100%] contents
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] contents
generating indices... genindex done
writing additional pages... search done
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
_____________________________________________________________________ ERROR at setup of TestConfigCLTimeout.test_output _____________________________________________________________________

cls = <class 'nb2plots.tests.test_timeout.TestConfigCLTimeout'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
            raise e
>       cls.build_source()

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:223:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'nb2plots.tests.test_timeout.TestConfigCLTimeout'>

    @classmethod
    def build_source(cls):
        try:  # Catch exceptions during sphinx build
            cls.build_app.build(False, [])
            if cls.build_app.statuscode != 0:
                cls.build_error = "Unknown error"
        except Exception as e:  # Exceptions during sphinx build
            cls.build_error = e
        # We will later check if a page build that should error, did error
        if cls.build_error is None or cls.should_error:
            return
        # An unexpected error - delete temp dir and report.
        shutil.rmtree(cls.build_path)
>       raise RuntimeError('page build failed with build error {}'
                           .format(cls.build_error))
E       RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 required positional argument: 'env')

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:254: RuntimeError
____________________________________________________________________ ERROR at setup of TestBestTimeout.test_build_error _____________________________________________________________________

cls = <class 'nb2plots.tests.test_timeout.TestBestTimeout'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
            raise e
>       cls.build_source()

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:223:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'nb2plots.tests.test_timeout.TestBestTimeout'>

    @classmethod
    def build_source(cls):
        try:  # Catch exceptions during sphinx build
            cls.build_app.build(False, [])
            if cls.build_app.statuscode != 0:
                cls.build_error = "Unknown error"
        except Exception as e:  # Exceptions during sphinx build
            cls.build_error = e
        # We will later check if a page build that should error, did error
        if cls.build_error is None or cls.should_error:
            return
        # An unexpected error - delete temp dir and report.
        shutil.rmtree(cls.build_path)
>       raise RuntimeError('page build failed with build error {}'
                           .format(cls.build_error))
E       RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 required positional argument: 'env')

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:254: RuntimeError
----------------------------------------------------------------------------------- Captured stdout setup -----------------------------------------------------------------------------------
Running Sphinx v7.0.1
making output directory... done
building [mo]: targets for 0 po files that are out of date
writing output...
building [html]: targets for 2 source files that are out of date
updating environment: [new config] 2 added, 0 changed, 0 removed
reading sources... [100%] contents
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] contents
generating indices... genindex done
writing additional pages... search done
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
_______________________________________________________________________ ERROR at setup of TestBestTimeout.test_output _______________________________________________________________________

cls = <class 'nb2plots.tests.test_timeout.TestBestTimeout'>

    @classmethod
    def setup_class(cls):
        cls.build_error = None
        cls.build_path = mkdtemp()
        try:  # Catch exceptions during test setup
            # Sets page_source, maybe modifies source
            cls.set_page_source()
            cls.out_dir = pjoin(cls.build_path, cls.builder)
            cls.doctree_dir = pjoin(cls.build_path, 'doctrees')
            # App to build the pages with warnings turned into errors
            cls.build_app = TestApp(
                cls.page_source,
                cls.page_source,
                cls.out_dir,
                cls.doctree_dir,
                cls.builder,
                warningiserror=True)
        except Exception as e:  # Exceptions during test setup
            shutil.rmtree(cls.build_path)
            raise e
>       cls.build_source()

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:223:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class 'nb2plots.tests.test_timeout.TestBestTimeout'>

    @classmethod
    def build_source(cls):
        try:  # Catch exceptions during sphinx build
            cls.build_app.build(False, [])
            if cls.build_app.statuscode != 0:
                cls.build_error = "Unknown error"
        except Exception as e:  # Exceptions during sphinx build
            cls.build_error = e
        # We will later check if a page build that should error, did error
        if cls.build_error is None or cls.should_error:
            return
        # An unexpected error - delete temp dir and report.
        shutil.rmtree(cls.build_path)
>       raise RuntimeError('page build failed with build error {}'
                           .format(cls.build_error))
E       RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 required positional argument: 'env')

/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:254: RuntimeError
========================================================================================= FAILURES ==========================================================================================
______________________________________________________________________________________ test_codelinks _______________________________________________________________________________________

self = <sphinx.events.EventManager object at 0x7fba05863d00>, name = 'build-finished', allowed_exceptions = (), args = (None,), results = []
listeners = [EventListener(id=67, handler=<function write_runfiles at 0x7fba05dd23a0>, priority=500)]

    def emit(self, name: str, *args: Any,
             allowed_exceptions: tuple[type[Exception], ...] = ()) -> list:
        """Emit a Sphinx event."""
        try:
            logger.debug('[app] emitting event: %r%s', name, repr(args)[:100])
        except Exception:
            # not every object likes to be repr()'d (think
            # random stuff coming via autodoc)
            pass

        results = []
        listeners = sorted(self.listeners[name], key=attrgetter("priority"))
        for listener in listeners:
            try:
>               results.append(listener.handler(self.app, *args))

/usr/lib/python3.8/site-packages/sphinx/events.py:96:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
nb2plots/runroles.py:309: in write_runfiles
    NAME2ROLE[code_type].write_queue(queue, app)
nb2plots/runroles.py:104: in write_queue
    self.write(node, app)
nb2plots/runroles.py:118: in write
    built = self.get_built(node, app)
nb2plots/runroles.py:142: in get_built
    own_params[code_type] = self._build(node, app)
nb2plots/runroles.py:148: in _build
    builder = self.builder_class(app)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <nb2plots.sphinx2foos.PythonBuilder object at 0x7fba05256a90>, app = <sphinxtesters.sphinxutils.TempApp object at 0x7fba053049d0>

    def __init__(self, app):
        """ Initialize Markdown (and friends) builder
        """
>       super(MarkdownBuilder, self).__init__(app)
E       TypeError: __init__() missing 1 required positional argument: 'env'

nb2plots/sphinx2foos.py:18: TypeError

The above exception was the direct cause of the following exception:

    def test_codelinks():

        def as_pxml(rst_text):
            return to_pxml.from_rst(rst_text, resolve=False)

        page = """\
    Text here

    .. code-links::

    More text here."""
        both_re = re.compile(r"""<document source=".*?">
        <paragraph>
            Text here
        <code_links>
            <bullet_list bullet="\*">
                <list_item>
                    <paragraph>
                        <runrole_reference refdoc="contents" reftarget="/contents.py" reftype="pyfile">
                            Download this page as a Python code file
                        ;
                <list_item>
                    <paragraph>
                        <runrole_reference refdoc="contents" reftarget="/contents.ipynb" reftype="clearnotebook">
                            Download this page as a Jupyter notebook \(no outputs\)
                        ;
                <list_item>
                    <paragraph>
                        <runrole_reference refdoc="contents" reftarget="/contents_full.ipynb" reftype="fullnotebook">
                            Download this page as a Jupyter notebook \(with outputs\)
                        .
        <paragraph>
            More text here.""")
>       pxml = as_pxml(page)

nb2plots/tests/test_codelinks.py:45:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
nb2plots/tests/test_codelinks.py:15: in as_pxml
    return to_pxml.from_rst(rst_text, resolve=False)
nb2plots/converters.py:124: in from_rst
    doctree, app = self._build_rst(rst_text, resolve)
nb2plots/converters.py:84: in _build_rst
    app.build(True, [])
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:112: in build
    return super(TestApp, self).build(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/application.py:353: in build
    self.events.emit('build-finished', None)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <sphinx.events.EventManager object at 0x7fba05863d00>, name = 'build-finished', allowed_exceptions = (), args = (None,), results = []
listeners = [EventListener(id=67, handler=<function write_runfiles at 0x7fba05dd23a0>, priority=500)]

    def emit(self, name: str, *args: Any,
             allowed_exceptions: tuple[type[Exception], ...] = ()) -> list:
        """Emit a Sphinx event."""
        try:
            logger.debug('[app] emitting event: %r%s', name, repr(args)[:100])
        except Exception:
            # not every object likes to be repr()'d (think
            # random stuff coming via autodoc)
            pass

        results = []
        listeners = sorted(self.listeners[name], key=attrgetter("priority"))
        for listener in listeners:
            try:
                results.append(listener.handler(self.app, *args))
            except allowed_exceptions:
                # pass through the errors specified as *allowed_exceptions*
                raise
            except SphinxError:
                raise
            except Exception as exc:
                if self.app.pdb:
                    # Just pass through the error, so that it can be debugged.
                    raise
                modname = safe_getattr(listener.handler, '__module__', None)
>               raise ExtensionError(__("Handler %r for event %r threw an exception") %
                                     (listener.handler, name), exc, modname=modname) from exc
E               sphinx.errors.ExtensionError: Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 required positional argument: 'env')

/usr/lib/python3.8/site-packages/sphinx/events.py:107: ExtensionError
----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------
Running Sphinx v7.0.1
making output directory... done
building [mo]: all of 0 po files
writing output...
building [pseudoxml]: all source files
updating environment: [new config] 1 added, 0 changed, 0 removed
reading sources... [100%] contents
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] contents
________________________________________________________________________________________ test_basic _________________________________________________________________________________________

    def test_basic():
>       assert_rst_cells_equal('Some text', [n_md_c('Some text')])

nb2plots/tests/test_doctree2nb.py:45:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
nb2plots/tests/test_doctree2nb.py:39: in assert_rst_cells_equal
    actual = to_notebook.from_rst(rst_text)
nb2plots/converters.py:124: in from_rst
    doctree, app = self._build_rst(rst_text, resolve)
nb2plots/converters.py:78: in _build_rst
    app = self._make_app(rst_text)
nb2plots/converters.py:55: in _make_app
    return TempApp(rst_text,
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:149: in __init__
    TestApp.__init__(self,
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:64: in __init__
    super(TestApp, self).__init__(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/application.py:262: in __init__
    self.builder = self.create_builder(buildername)
/usr/lib/python3.8/site-packages/sphinx/application.py:335: in create_builder
    return self.registry.create_builder(self, name, self.env)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <sphinx.registry.SphinxComponentRegistry object at 0x7fba050c6df0>, app = <sphinxtesters.sphinxutils.TempApp object at 0x7fba050d17c0>, name = 'jupyter'
env = <sphinx.environment.BuildEnvironment object at 0x7fba050d1f10>

    def create_builder(self, app: Sphinx, name: str,
                       env: BuildEnvironment | None = None) -> Builder:
        if name not in self.builders:
            raise SphinxError(__('Builder name %s not registered') % name)

>       return self.builders[name](app, env)
E       TypeError: __init__() takes 2 positional arguments but 3 were given

/usr/lib/python3.8/site-packages/sphinx/registry.py:157: TypeError
----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------
Running Sphinx v7.0.1
making output directory... done
__________________________________________________________________________________ test_runrole_reference ___________________________________________________________________________________

    def test_runrole_reference():
        # Ignore notebook reference in source ReST
>       assert_rst_cells_equal('Some text :clearnotebook:`.`',
                               [n_md_c('Some text')])

nb2plots/tests/test_doctree2nb.py:50:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
nb2plots/tests/test_doctree2nb.py:39: in assert_rst_cells_equal
    actual = to_notebook.from_rst(rst_text)
nb2plots/converters.py:124: in from_rst
    doctree, app = self._build_rst(rst_text, resolve)
nb2plots/converters.py:78: in _build_rst
    app = self._make_app(rst_text)
nb2plots/converters.py:55: in _make_app
    return TempApp(rst_text,
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:149: in __init__
    TestApp.__init__(self,
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:64: in __init__
    super(TestApp, self).__init__(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/application.py:262: in __init__
    self.builder = self.create_builder(buildername)
/usr/lib/python3.8/site-packages/sphinx/application.py:335: in create_builder
    return self.registry.create_builder(self, name, self.env)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <sphinx.registry.SphinxComponentRegistry object at 0x7fba05103f10>, app = <sphinxtesters.sphinxutils.TempApp object at 0x7fba05222100>, name = 'jupyter'
env = <sphinx.environment.BuildEnvironment object at 0x7fba05023a90>

    def create_builder(self, app: Sphinx, name: str,
                       env: BuildEnvironment | None = None) -> Builder:
        if name not in self.builders:
            raise SphinxError(__('Builder name %s not registered') % name)

>       return self.builders[name](app, env)
E       TypeError: __init__() takes 2 positional arguments but 3 were given

/usr/lib/python3.8/site-packages/sphinx/registry.py:157: TypeError
----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------
Running Sphinx v7.0.1
making output directory... done
_________________________________________________________________________________________ test_only _________________________________________________________________________________________

    def test_only():
        for builder_name in ('html', 'latex', 'unbelievable'):
>           assert_rst_cells_equal(
    """
    Before

    .. only:: {0}

        Specific to builder {0}

    After""".format(builder_name),
                [n_md_c('Before\n\nAfter')])

nb2plots/tests/test_doctree2nb.py:58:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
nb2plots/tests/test_doctree2nb.py:39: in assert_rst_cells_equal
    actual = to_notebook.from_rst(rst_text)
nb2plots/converters.py:124: in from_rst
    doctree, app = self._build_rst(rst_text, resolve)
nb2plots/converters.py:78: in _build_rst
    app = self._make_app(rst_text)
nb2plots/converters.py:55: in _make_app
    return TempApp(rst_text,
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:149: in __init__
    TestApp.__init__(self,
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:64: in __init__
    super(TestApp, self).__init__(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/application.py:262: in __init__
    self.builder = self.create_builder(buildername)
/usr/lib/python3.8/site-packages/sphinx/application.py:335: in create_builder
    return self.registry.create_builder(self, name, self.env)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <sphinx.registry.SphinxComponentRegistry object at 0x7fba04f8d2e0>, app = <sphinxtesters.sphinxutils.TempApp object at 0x7fba04f8df10>, name = 'jupyter'
env = <sphinx.environment.BuildEnvironment object at 0x7fba04f8d490>

    def create_builder(self, app: Sphinx, name: str,
                       env: BuildEnvironment | None = None) -> Builder:
        if name not in self.builders:
            raise SphinxError(__('Builder name %s not registered') % name)

>       return self.builders[name](app, env)
E       TypeError: __init__() takes 2 positional arguments but 3 were given

/usr/lib/python3.8/site-packages/sphinx/registry.py:157: TypeError
----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------
Running Sphinx v7.0.1
making output directory... done
_______________________________________________________________________________________ test_doctests _______________________________________________________________________________________

    def test_doctests():
>       assert_rst_cells_equal("""\
    Text 1

    >>> # A comment
    >>> a = 1

    Text 2
    """, [n_md_c('Text 1'), n_c_c('# A comment\na = 1'), n_md_c('Text 2')])

nb2plots/tests/test_doctree2nb.py:81:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
nb2plots/tests/test_doctree2nb.py:39: in assert_rst_cells_equal
    actual = to_notebook.from_rst(rst_text)
nb2plots/converters.py:124: in from_rst
    doctree, app = self._build_rst(rst_text, resolve)
nb2plots/converters.py:78: in _build_rst
    app = self._make_app(rst_text)
nb2plots/converters.py:55: in _make_app
    return TempApp(rst_text,
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:149: in __init__
    TestApp.__init__(self,
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:64: in __init__
    super(TestApp, self).__init__(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/application.py:262: in __init__
    self.builder = self.create_builder(buildername)
/usr/lib/python3.8/site-packages/sphinx/application.py:335: in create_builder
    return self.registry.create_builder(self, name, self.env)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <sphinx.registry.SphinxComponentRegistry object at 0x7fba052da4f0>, app = <sphinxtesters.sphinxutils.TempApp object at 0x7fba052daa00>, name = 'jupyter'
env = <sphinx.environment.BuildEnvironment object at 0x7fba0519b580>

    def create_builder(self, app: Sphinx, name: str,
                       env: BuildEnvironment | None = None) -> Builder:
        if name not in self.builders:
            raise SphinxError(__('Builder name %s not registered') % name)

>       return self.builders[name](app, env)
E       TypeError: __init__() takes 2 positional arguments but 3 were given

/usr/lib/python3.8/site-packages/sphinx/registry.py:157: TypeError
----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------
Running Sphinx v7.0.1
making output directory... done
_______________________________________________________________________________________ test_nbplots ________________________________________________________________________________________

    def test_nbplots():
        # nbplot directive with doctest markers
>       assert_rst_cells_equal("""\
    Text 1

    .. nbplot::

        >>> # A comment
        >>> a = 1

    Text 2
    """, [n_md_c('Text 1'), n_c_c('# A comment\na = 1'), n_md_c('Text 2')])

nb2plots/tests/test_doctree2nb.py:93:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
nb2plots/tests/test_doctree2nb.py:39: in assert_rst_cells_equal
    actual = to_notebook.from_rst(rst_text)
nb2plots/converters.py:124: in from_rst
    doctree, app = self._build_rst(rst_text, resolve)
nb2plots/converters.py:78: in _build_rst
    app = self._make_app(rst_text)
nb2plots/converters.py:55: in _make_app
    return TempApp(rst_text,
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:149: in __init__
    TestApp.__init__(self,
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:64: in __init__
    super(TestApp, self).__init__(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/application.py:262: in __init__
    self.builder = self.create_builder(buildername)
/usr/lib/python3.8/site-packages/sphinx/application.py:335: in create_builder
    return self.registry.create_builder(self, name, self.env)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <sphinx.registry.SphinxComponentRegistry object at 0x7fba052225b0>, app = <sphinxtesters.sphinxutils.TempApp object at 0x7fba052223a0>, name = 'jupyter'
env = <sphinx.environment.BuildEnvironment object at 0x7fba04c1a3d0>

    def create_builder(self, app: Sphinx, name: str,
                       env: BuildEnvironment | None = None) -> Builder:
        if name not in self.builders:
            raise SphinxError(__('Builder name %s not registered') % name)

>       return self.builders[name](app, env)
E       TypeError: __init__() takes 2 positional arguments but 3 were given

/usr/lib/python3.8/site-packages/sphinx/registry.py:157: TypeError
----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------
Running Sphinx v7.0.1
making output directory... done
____________________________________________________________________________________ test_example_files _____________________________________________________________________________________

    def test_example_files():
        # test conversion over all .rst files, checking against .ipynb files
        for rst_fname in glob(pjoin(DATA_PATH, '*.rst')):
            rst_contents = fcontents(rst_fname, 't')
            nb_fname = rst_fname[:-3] + 'ipynb'
            nb_contents = fcontents(nb_fname, 't')
>           assert_conv_equal(rst_contents, nb_contents)

nb2plots/tests/test_doctree2nb.py:144:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
nb2plots/tests/test_doctree2nb.py:135: in assert_conv_equal
    assert_nb_equiv(to_nb_safe(rst_str), expected)
nb2plots/tests/test_doctree2nb.py:24: in to_nb_safe
    out = to_notebook.from_rst(rst_str)
nb2plots/converters.py:124: in from_rst
    doctree, app = self._build_rst(rst_text, resolve)
nb2plots/converters.py:78: in _build_rst
    app = self._make_app(rst_text)
nb2plots/converters.py:55: in _make_app
    return TempApp(rst_text,
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:149: in __init__
    TestApp.__init__(self,
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:64: in __init__
    super(TestApp, self).__init__(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/application.py:262: in __init__
    self.builder = self.create_builder(buildername)
/usr/lib/python3.8/site-packages/sphinx/application.py:335: in create_builder
    return self.registry.create_builder(self, name, self.env)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <sphinx.registry.SphinxComponentRegistry object at 0x7fba052c85e0>, app = <sphinxtesters.sphinxutils.TempApp object at 0x7fba05685fa0>, name = 'jupyter'
env = <sphinx.environment.BuildEnvironment object at 0x7fba052c88e0>

    def create_builder(self, app: Sphinx, name: str,
                       env: BuildEnvironment | None = None) -> Builder:
        if name not in self.builders:
            raise SphinxError(__('Builder name %s not registered') % name)

>       return self.builders[name](app, env)
E       TypeError: __init__() takes 2 positional arguments but 3 were given

/usr/lib/python3.8/site-packages/sphinx/registry.py:157: TypeError
----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------
Running Sphinx v7.0.1
making output directory... done
____________________________________________________________________________________ test_notebook_basic ____________________________________________________________________________________

    def test_notebook_basic():
        # Test conversion of basic ReST to ipynb JSON
>       ipynb = to_notebook.from_rst(r"""
    Title
    =====

    Some text with :math:`a = 1` math.

    .. math::

        \textrm{math block}

    .. nbplot::

        >>> c = 1
        >>> c
        1

    More text.

    .. nbplot::

        >>> d = 2
        >>> d
        2""")

nb2plots/tests/test_doctree2nb.py:149:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
nb2plots/converters.py:124: in from_rst
    doctree, app = self._build_rst(rst_text, resolve)
nb2plots/converters.py:78: in _build_rst
    app = self._make_app(rst_text)
nb2plots/converters.py:55: in _make_app
    return TempApp(rst_text,
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:149: in __init__
    TestApp.__init__(self,
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:64: in __init__
    super(TestApp, self).__init__(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/application.py:262: in __init__
    self.builder = self.create_builder(buildername)
/usr/lib/python3.8/site-packages/sphinx/application.py:335: in create_builder
    return self.registry.create_builder(self, name, self.env)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <sphinx.registry.SphinxComponentRegistry object at 0x7fba05017370>, app = <sphinxtesters.sphinxutils.TempApp object at 0x7fba05017610>, name = 'jupyter'
env = <sphinx.environment.BuildEnvironment object at 0x7fba05017310>

    def create_builder(self, app: Sphinx, name: str,
                       env: BuildEnvironment | None = None) -> Builder:
        if name not in self.builders:
            raise SphinxError(__('Builder name %s not registered') % name)

>       return self.builders[name](app, env)
E       TypeError: __init__() takes 2 positional arguments but 3 were given

/usr/lib/python3.8/site-packages/sphinx/registry.py:157: TypeError
----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------
Running Sphinx v7.0.1
making output directory... done
__________________________________________________________________________________ test_default_mathdollar __________________________________________________________________________________

    def test_default_mathdollar():
        # Test mathdollar extension present by default.
>       ipynb = to_notebook.from_rst(r'Some text with $a = 1$ math.')

nb2plots/tests/test_doctree2nb.py:224:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
nb2plots/converters.py:124: in from_rst
    doctree, app = self._build_rst(rst_text, resolve)
nb2plots/converters.py:78: in _build_rst
    app = self._make_app(rst_text)
nb2plots/converters.py:55: in _make_app
    return TempApp(rst_text,
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:149: in __init__
    TestApp.__init__(self,
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:64: in __init__
    super(TestApp, self).__init__(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/application.py:262: in __init__
    self.builder = self.create_builder(buildername)
/usr/lib/python3.8/site-packages/sphinx/application.py:335: in create_builder
    return self.registry.create_builder(self, name, self.env)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <sphinx.registry.SphinxComponentRegistry object at 0x7fba05256d30>, app = <sphinxtesters.sphinxutils.TempApp object at 0x7fba05863d30>, name = 'jupyter'
env = <sphinx.environment.BuildEnvironment object at 0x7fba05256370>

    def create_builder(self, app: Sphinx, name: str,
                       env: BuildEnvironment | None = None) -> Builder:
        if name not in self.builders:
            raise SphinxError(__('Builder name %s not registered') % name)

>       return self.builders[name](app, env)
E       TypeError: __init__() takes 2 positional arguments but 3 were given

/usr/lib/python3.8/site-packages/sphinx/registry.py:157: TypeError
----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------
Running Sphinx v7.0.1
making output directory... done
____________________________________________________________________________________ test_example_files _____________________________________________________________________________________

    def test_example_files():
        # test conversion code over all .rst files checking against .py files
        for rst_fname in glob(pjoin(DATA_PATH, '*.rst')):
            rst_contents = fcontents(rst_fname, 't')
            py_fname = rst_fname[:-3] + 'py'
            contents = fcontents(py_fname, 't')
>           assert_conv_equal(rst_contents, contents)

nb2plots/tests/test_doctree2py.py:42:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
nb2plots/tests/test_doctree2py.py:33: in assert_conv_equal
    convert_assert(rst_str, to_py_safe, md_expected, None)
nb2plots/testing/convutils.py:55: in convert_assert
    actual = converter(rst_str)
nb2plots/testing/convutils.py:38: in unsmarted
    return unsmart(converter(rst_str))
nb2plots/converters.py:124: in from_rst
    doctree, app = self._build_rst(rst_text, resolve)
nb2plots/converters.py:78: in _build_rst
    app = self._make_app(rst_text)
nb2plots/converters.py:55: in _make_app
    return TempApp(rst_text,
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:149: in __init__
    TestApp.__init__(self,
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:64: in __init__
    super(TestApp, self).__init__(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/application.py:262: in __init__
    self.builder = self.create_builder(buildername)
/usr/lib/python3.8/site-packages/sphinx/application.py:335: in create_builder
    return self.registry.create_builder(self, name, self.env)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <sphinx.registry.SphinxComponentRegistry object at 0x7fba04675850>, app = <sphinxtesters.sphinxutils.TempApp object at 0x7fba04675100>, name = 'python'
env = <sphinx.environment.BuildEnvironment object at 0x7fba05211880>

    def create_builder(self, app: Sphinx, name: str,
                       env: BuildEnvironment | None = None) -> Builder:
        if name not in self.builders:
            raise SphinxError(__('Builder name %s not registered') % name)

>       return self.builders[name](app, env)
E       TypeError: __init__() takes 2 positional arguments but 3 were given

/usr/lib/python3.8/site-packages/sphinx/registry.py:157: TypeError
----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------
Running Sphinx v7.0.1
making output directory... done
______________________________________________________________________________________ test_regression ______________________________________________________________________________________

    def test_regression():
        # Test documentation worked example
        input_nb_fname = pjoin(DATA, 'example_notebook.ipynb')
        output_rst_fname = pjoin(DATA, 'converted_example.rst')
        # Convert to ReST, add trailing CR from output script
        rst = convert_nb_fname(input_nb_fname) + '\n'
        assert stripeq(rst.encode('utf8'), fcontents(output_rst_fname))
        # Convert ReST to output formats
>       py_file = to_py.from_rst(rst)

nb2plots/tests/test_regression.py:25:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
nb2plots/converters.py:124: in from_rst
    doctree, app = self._build_rst(rst_text, resolve)
nb2plots/converters.py:78: in _build_rst
    app = self._make_app(rst_text)
nb2plots/converters.py:55: in _make_app
    return TempApp(rst_text,
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:149: in __init__
    TestApp.__init__(self,
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:64: in __init__
    super(TestApp, self).__init__(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/application.py:262: in __init__
    self.builder = self.create_builder(buildername)
/usr/lib/python3.8/site-packages/sphinx/application.py:335: in create_builder
    return self.registry.create_builder(self, name, self.env)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <sphinx.registry.SphinxComponentRegistry object at 0x7fba048c75e0>, app = <sphinxtesters.sphinxutils.TempApp object at 0x7fb9e4566eb0>, name = 'python'
env = <sphinx.environment.BuildEnvironment object at 0x7fb9e4720fd0>

    def create_builder(self, app: Sphinx, name: str,
                       env: BuildEnvironment | None = None) -> Builder:
        if name not in self.builders:
            raise SphinxError(__('Builder name %s not registered') % name)

>       return self.builders[name](app, env)
E       TypeError: __init__() takes 2 positional arguments but 3 were given

/usr/lib/python3.8/site-packages/sphinx/registry.py:157: TypeError
----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------
Running Sphinx v7.0.1
making output directory... done
___________________________________________________________________________________ test_runrole_doctrees ___________________________________________________________________________________

self = <sphinx.events.EventManager object at 0x7fb9e4802dc0>, name = 'build-finished', allowed_exceptions = (), args = (None,), results = []
listeners = [EventListener(id=67, handler=<function write_runfiles at 0x7fba05dd23a0>, priority=500)]

    def emit(self, name: str, *args: Any,
             allowed_exceptions: tuple[type[Exception], ...] = ()) -> list:
        """Emit a Sphinx event."""
        try:
            logger.debug('[app] emitting event: %r%s', name, repr(args)[:100])
        except Exception:
            # not every object likes to be repr()'d (think
            # random stuff coming via autodoc)
            pass

        results = []
        listeners = sorted(self.listeners[name], key=attrgetter("priority"))
        for listener in listeners:
            try:
>               results.append(listener.handler(self.app, *args))

/usr/lib/python3.8/site-packages/sphinx/events.py:96:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
nb2plots/runroles.py:309: in write_runfiles
    NAME2ROLE[code_type].write_queue(queue, app)
nb2plots/runroles.py:104: in write_queue
    self.write(node, app)
nb2plots/runroles.py:118: in write
    built = self.get_built(node, app)
nb2plots/runroles.py:142: in get_built
    own_params[code_type] = self._build(node, app)
nb2plots/runroles.py:148: in _build
    builder = self.builder_class(app)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <nb2plots.sphinx2foos.NotebookBuilder object at 0x7fb9e4637e80>, app = <sphinxtesters.sphinxutils.TempApp object at 0x7fb9e486caf0>

    def __init__(self, app):
        """ Initialize Markdown (and friends) builder
        """
>       super(MarkdownBuilder, self).__init__(app)
E       TypeError: __init__() missing 1 required positional argument: 'env'

nb2plots/sphinx2foos.py:18: TypeError

The above exception was the direct cause of the following exception:

    def test_runrole_doctrees():
        # Test that run roles generate expected doctrees
        expected_re_fmt = """\
    <document source=".*?">
        <paragraph>
            Text then
            <runrole_reference filename="{filebase}.{ext}" refdoc="contents" reftarget="{base}.{ext}" reftype="{role_type}">
                {descr}
             then text."""

        def assert_rst_pxml(pxml_params, rst_source):
            code_type = pxml_params['code_type']
            pxml = to_pxml.from_rst(rst_source)
            if not 'ext' in pxml_params:
                pxml_params['ext'] = 'py' if code_type == 'pyfile' else 'ipynb'
            pxml_regex = expected_re_fmt.format(
                role_type=code_type,
                **pxml_params)
            assert re.match(pxml_regex, pxml)

>       assert_rst_pxml(
            dict(code_type='clearnotebook',
                 filebase='contents',
                 base='/contents',
                 descr=r'Download this page as a Jupyter notebook \(no outputs\)'),
            "Text then :clearnotebook:`.` then text.")

nb2plots/tests/test_runroles.py:71:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
nb2plots/tests/test_runroles.py:63: in assert_rst_pxml
    pxml = to_pxml.from_rst(rst_source)
nb2plots/converters.py:124: in from_rst
    doctree, app = self._build_rst(rst_text, resolve)
nb2plots/converters.py:84: in _build_rst
    app.build(True, [])
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:112: in build
    return super(TestApp, self).build(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/application.py:353: in build
    self.events.emit('build-finished', None)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <sphinx.events.EventManager object at 0x7fb9e4802dc0>, name = 'build-finished', allowed_exceptions = (), args = (None,), results = []
listeners = [EventListener(id=67, handler=<function write_runfiles at 0x7fba05dd23a0>, priority=500)]

    def emit(self, name: str, *args: Any,
             allowed_exceptions: tuple[type[Exception], ...] = ()) -> list:
        """Emit a Sphinx event."""
        try:
            logger.debug('[app] emitting event: %r%s', name, repr(args)[:100])
        except Exception:
            # not every object likes to be repr()'d (think
            # random stuff coming via autodoc)
            pass

        results = []
        listeners = sorted(self.listeners[name], key=attrgetter("priority"))
        for listener in listeners:
            try:
                results.append(listener.handler(self.app, *args))
            except allowed_exceptions:
                # pass through the errors specified as *allowed_exceptions*
                raise
            except SphinxError:
                raise
            except Exception as exc:
                if self.app.pdb:
                    # Just pass through the error, so that it can be debugged.
                    raise
                modname = safe_getattr(listener.handler, '__module__', None)
>               raise ExtensionError(__("Handler %r for event %r threw an exception") %
                                     (listener.handler, name), exc, modname=modname) from exc
E               sphinx.errors.ExtensionError: Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 required positional argument: 'env')

/usr/lib/python3.8/site-packages/sphinx/events.py:107: ExtensionError
----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------
Running Sphinx v7.0.1
making output directory... done
building [mo]: all of 0 po files
writing output...
building [pseudoxml]: all source files
updating environment: [new config] 1 added, 0 changed, 0 removed
reading sources... [100%] contents
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] contents
______________________________________________________________________________________ test_sphinx2md _______________________________________________________________________________________

    @script_test
    def test_sphinx2md():
        # test sphinx2md script over all .rst files checking against .smd / .md
        # files
        for rst_fname in glob(pjoin(DATA_PATH, '*.rst')):
            # Try .smd filename first, otherwise ordinary .md
            md_fname = rst_fname[:-3] + 'smd'
            if not exists(md_fname):
                md_fname = rst_fname[:-3] + 'md'
            expected_md = fcontents(md_fname)
            cmd = ['sphinx2md', rst_fname]
>           code, stdout, stderr = run_command(cmd)

nb2plots/tests/test_scripts.py:57:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <scripttester.scripttester.ScriptTester object at 0x7fba05d6da90>
cmd = ['/usr/bin/python3', '/home/tkloczko/rpmbuild/BUILD/nb2plots-0.6.1/scripts/sphinx2md', '/home/tkloczko/rpmbuild/BUILD/nb2plots-0.6.1/nb2plots/tests/rst_md_files/blockquotes.rst']
check_code = True

    def run_command(self, cmd, check_code=True):
        """ Run command sequence `cmd` returning exit code, stdout, stderr

        Parameters
        ----------
        cmd : str or sequence
            string with command name or sequence of strings defining command
        check_code : {True, False}, optional
            If True, raise error for non-zero return code

        Returns
        -------
        returncode : int
            return code from execution of `cmd`
        stdout : bytes (python 3) or str (python 2)
            stdout from `cmd`
        stderr : bytes (python 3) or str (python 2)
            stderr from `cmd`
        """
        cmd = [cmd] if isinstance(cmd, string_types) else list(cmd)
        using_sys_path = self.local_script_dir is None
        if not using_sys_path:
            # Windows can't run script files without extensions natively so we need
            # to run local scripts (no extensions) via the Python interpreter.  On
            # Unix, we might have the wrong incantation for the Python interpreter
            # in the hash bang first line in the source file.  So, either way, run
            # the script through the Python interpreter
            cmd = [sys.executable,
                   pjoin(self.local_script_dir, cmd[0])] + cmd[1:]
        elif os.name == 'nt':
            # Must add extension to find on path with Windows
            cmd[0] = cmd[0] + self.win_bin_ext
        if os.name == 'nt':
            # Quote any arguments with spaces. The quotes delimit the arguments
            # on Windows, and the arguments might be file paths with spaces.
            # On Unix the list elements are each separate arguments.
            cmd = ['"{0}"'.format(c) if ' ' in c else c for c in cmd]
        if self.debug_print:
            print("Running command '%s'" % cmd)
        env = os.environ
        if using_sys_path and self.local_module_dir:
            # module likely comes from the current working directory. We might
            # need that directory on the path if we're running the scripts from
            # a temporary directory.
            env = env.copy()  # Modifying env, make temporary copy.
            pypath = env.get('PYTHONPATH', None)
            if pypath is None:
                env['PYTHONPATH'] = self.local_module_dir
            else:
                env['PYTHONPATH'] = self.local_module_dir + pathsep + pypath
        proc = Popen(cmd, stdout=PIPE, stderr=PIPE, env=env)
        stdout, stderr = proc.communicate()
        if proc.poll() == None:
            proc.terminate()
        if check_code and proc.returncode != 0:
>           raise RuntimeError(
                """Command "{0}" failed with
                stdout
                ------
                {1}
                stderr
                ------
                {2}
                """.format(cmd, stdout, stderr))
E           RuntimeError: Command "['/usr/bin/python3', '/home/tkloczko/rpmbuild/BUILD/nb2plots-0.6.1/scripts/sphinx2md', '/home/tkloczko/rpmbuild/BUILD/nb2plots-0.6.1/nb2plots/tests/rst_md_files/blockquotes.rst']" failed with
E                           stdout
E                           ------
E                           b''
E                           stderr
E                           ------
E                           b'\x1b[01mRunning Sphinx v7.0.1\x1b[39;49;00m\n\x1b[01mmaking output directory... \x1b[39;49;00mdone\nTraceback (most recent call last):\n  File "/home/tkloczko/rpmbuild/BUILD/nb2plots-0.6.1/scripts/sphinx2md", line 16, in <module>\n    do_main("Convert Sphinx ReST file to Markdown", \'markdown\')\n  File "/home/tkloczko/rpmbuild/BUILDROOT/python-nb2plots-0.6.1-8.fc35.x86_64/usr/lib/python3.8/site-packages/nb2plots/commands.py", line 30, in do_main\n    output = converter.from_rst(contents)\n  File "/home/tkloczko/rpmbuild/BUILDROOT/python-nb2plots-0.6.1-8.fc35.x86_64/usr/lib/python3.8/site-packages/nb2plots/converters.py", line 124, in from_rst\n    doctree, app = self._build_rst(rst_text, resolve)\n  File "/home/tkloczko/rpmbuild/BUILDROOT/python-nb2plots-0.6.1-8.fc35.x86_64/usr/lib/python3.8/site-packages/nb2plots/converters.py", line 78, in _build_rst\n    app = self._make_app(rst_text)\n  File "/home/tkloczko/rpmbuild/BUILDROOT/python-nb2plots-0.6.1-8.fc35.x86_64/usr/lib/python3.8/site-packages/nb2plots/converters.py", line 55, in _make_app\n    return TempApp(rst_text,\n  File "/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py", line 149, in __init__\n    TestApp.__init__(self,\n  File "/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py", line 64, in __init__\n    super(TestApp, self).__init__(*args, **kwargs)\n  File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 262, in __init__\n    self.builder = self.create_builder(buildername)\n  File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 335, in create_builder\n    return self.registry.create_builder(self, name, self.env)\n  File "/usr/lib/python3.8/site-packages/sphinx/registry.py", line 157, in create_builder\n    return self.builders[name](app, env)\nTypeError: __init__() takes 2 positional arguments but 3 were given\n'

/usr/lib/python3.8/site-packages/scripttester/scripttester.py:194: RuntimeError
______________________________________________________________________________________ test_sphinx2nb _______________________________________________________________________________________

    @script_test
    def test_sphinx2nb():
        # test sphinx2nb script over all .rst files checking against .ipynb files
        for rst_fname in glob(pjoin(DATA_PATH, '*.rst')):
            nb_fname = rst_fname[:-3] + 'ipynb'
            expected = fcontents(nb_fname, 't')
            cmd = ['sphinx2nb', rst_fname]
>           code, stdout, stderr = run_command(cmd)

nb2plots/tests/test_scripts.py:69:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <scripttester.scripttester.ScriptTester object at 0x7fba05d6da90>
cmd = ['/usr/bin/python3', '/home/tkloczko/rpmbuild/BUILD/nb2plots-0.6.1/scripts/sphinx2nb', '/home/tkloczko/rpmbuild/BUILD/nb2plots-0.6.1/nb2plots/tests/rst_md_files/blockquotes.rst']
check_code = True

    def run_command(self, cmd, check_code=True):
        """ Run command sequence `cmd` returning exit code, stdout, stderr

        Parameters
        ----------
        cmd : str or sequence
            string with command name or sequence of strings defining command
        check_code : {True, False}, optional
            If True, raise error for non-zero return code

        Returns
        -------
        returncode : int
            return code from execution of `cmd`
        stdout : bytes (python 3) or str (python 2)
            stdout from `cmd`
        stderr : bytes (python 3) or str (python 2)
            stderr from `cmd`
        """
        cmd = [cmd] if isinstance(cmd, string_types) else list(cmd)
        using_sys_path = self.local_script_dir is None
        if not using_sys_path:
            # Windows can't run script files without extensions natively so we need
            # to run local scripts (no extensions) via the Python interpreter.  On
            # Unix, we might have the wrong incantation for the Python interpreter
            # in the hash bang first line in the source file.  So, either way, run
            # the script through the Python interpreter
            cmd = [sys.executable,
                   pjoin(self.local_script_dir, cmd[0])] + cmd[1:]
        elif os.name == 'nt':
            # Must add extension to find on path with Windows
            cmd[0] = cmd[0] + self.win_bin_ext
        if os.name == 'nt':
            # Quote any arguments with spaces. The quotes delimit the arguments
            # on Windows, and the arguments might be file paths with spaces.
            # On Unix the list elements are each separate arguments.
            cmd = ['"{0}"'.format(c) if ' ' in c else c for c in cmd]
        if self.debug_print:
            print("Running command '%s'" % cmd)
        env = os.environ
        if using_sys_path and self.local_module_dir:
            # module likely comes from the current working directory. We might
            # need that directory on the path if we're running the scripts from
            # a temporary directory.
            env = env.copy()  # Modifying env, make temporary copy.
            pypath = env.get('PYTHONPATH', None)
            if pypath is None:
                env['PYTHONPATH'] = self.local_module_dir
            else:
                env['PYTHONPATH'] = self.local_module_dir + pathsep + pypath
        proc = Popen(cmd, stdout=PIPE, stderr=PIPE, env=env)
        stdout, stderr = proc.communicate()
        if proc.poll() == None:
            proc.terminate()
        if check_code and proc.returncode != 0:
>           raise RuntimeError(
                """Command "{0}" failed with
                stdout
                ------
                {1}
                stderr
                ------
                {2}
                """.format(cmd, stdout, stderr))
E           RuntimeError: Command "['/usr/bin/python3', '/home/tkloczko/rpmbuild/BUILD/nb2plots-0.6.1/scripts/sphinx2nb', '/home/tkloczko/rpmbuild/BUILD/nb2plots-0.6.1/nb2plots/tests/rst_md_files/blockquotes.rst']" failed with
E                           stdout
E                           ------
E                           b''
E                           stderr
E                           ------
E                           b'\x1b[01mRunning Sphinx v7.0.1\x1b[39;49;00m\n\x1b[01mmaking output directory... \x1b[39;49;00mdone\nTraceback (most recent call last):\n  File "/home/tkloczko/rpmbuild/BUILD/nb2plots-0.6.1/scripts/sphinx2nb", line 16, in <module>\n    do_main("Convert Sphinx ReST file to Notebook JSON", \'jupyter\')\n  File "/home/tkloczko/rpmbuild/BUILDROOT/python-nb2plots-0.6.1-8.fc35.x86_64/usr/lib/python3.8/site-packages/nb2plots/commands.py", line 30, in do_main\n    output = converter.from_rst(contents)\n  File "/home/tkloczko/rpmbuild/BUILDROOT/python-nb2plots-0.6.1-8.fc35.x86_64/usr/lib/python3.8/site-packages/nb2plots/converters.py", line 124, in from_rst\n    doctree, app = self._build_rst(rst_text, resolve)\n  File "/home/tkloczko/rpmbuild/BUILDROOT/python-nb2plots-0.6.1-8.fc35.x86_64/usr/lib/python3.8/site-packages/nb2plots/converters.py", line 78, in _build_rst\n    app = self._make_app(rst_text)\n  File "/home/tkloczko/rpmbuild/BUILDROOT/python-nb2plots-0.6.1-8.fc35.x86_64/usr/lib/python3.8/site-packages/nb2plots/converters.py", line 55, in _make_app\n    return TempApp(rst_text,\n  File "/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py", line 149, in __init__\n    TestApp.__init__(self,\n  File "/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py", line 64, in __init__\n    super(TestApp, self).__init__(*args, **kwargs)\n  File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 262, in __init__\n    self.builder = self.create_builder(buildername)\n  File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 335, in create_builder\n    return self.registry.create_builder(self, name, self.env)\n  File "/usr/lib/python3.8/site-packages/sphinx/registry.py", line 157, in create_builder\n    return self.builders[name](app, env)\nTypeError: __init__() takes 2 positional arguments but 3 were given\n'

/usr/lib/python3.8/site-packages/scripttester/scripttester.py:194: RuntimeError
______________________________________________________________________________________ test_sphinx2py _______________________________________________________________________________________

    @script_test
    def test_sphinx2py():
        # test sphinx2py script over all .rst files checking against .ipynb files
        for rst_fname in glob(pjoin(DATA_PATH, '*.rst')):
            py_fname = rst_fname[:-3] + 'py'
            expected = fcontents(py_fname, 'b')
            cmd = ['sphinx2py', rst_fname]
>           code, stdout, stderr = run_command(cmd)

nb2plots/tests/test_scripts.py:81:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <scripttester.scripttester.ScriptTester object at 0x7fba05d6da90>
cmd = ['/usr/bin/python3', '/home/tkloczko/rpmbuild/BUILD/nb2plots-0.6.1/scripts/sphinx2py', '/home/tkloczko/rpmbuild/BUILD/nb2plots-0.6.1/nb2plots/tests/rst_md_files/blockquotes.rst']
check_code = True

    def run_command(self, cmd, check_code=True):
        """ Run command sequence `cmd` returning exit code, stdout, stderr

        Parameters
        ----------
        cmd : str or sequence
            string with command name or sequence of strings defining command
        check_code : {True, False}, optional
            If True, raise error for non-zero return code

        Returns
        -------
        returncode : int
            return code from execution of `cmd`
        stdout : bytes (python 3) or str (python 2)
            stdout from `cmd`
        stderr : bytes (python 3) or str (python 2)
            stderr from `cmd`
        """
        cmd = [cmd] if isinstance(cmd, string_types) else list(cmd)
        using_sys_path = self.local_script_dir is None
        if not using_sys_path:
            # Windows can't run script files without extensions natively so we need
            # to run local scripts (no extensions) via the Python interpreter.  On
            # Unix, we might have the wrong incantation for the Python interpreter
            # in the hash bang first line in the source file.  So, either way, run
            # the script through the Python interpreter
            cmd = [sys.executable,
                   pjoin(self.local_script_dir, cmd[0])] + cmd[1:]
        elif os.name == 'nt':
            # Must add extension to find on path with Windows
            cmd[0] = cmd[0] + self.win_bin_ext
        if os.name == 'nt':
            # Quote any arguments with spaces. The quotes delimit the arguments
            # on Windows, and the arguments might be file paths with spaces.
            # On Unix the list elements are each separate arguments.
            cmd = ['"{0}"'.format(c) if ' ' in c else c for c in cmd]
        if self.debug_print:
            print("Running command '%s'" % cmd)
        env = os.environ
        if using_sys_path and self.local_module_dir:
            # module likely comes from the current working directory. We might
            # need that directory on the path if we're running the scripts from
            # a temporary directory.
            env = env.copy()  # Modifying env, make temporary copy.
            pypath = env.get('PYTHONPATH', None)
            if pypath is None:
                env['PYTHONPATH'] = self.local_module_dir
            else:
                env['PYTHONPATH'] = self.local_module_dir + pathsep + pypath
        proc = Popen(cmd, stdout=PIPE, stderr=PIPE, env=env)
        stdout, stderr = proc.communicate()
        if proc.poll() == None:
            proc.terminate()
        if check_code and proc.returncode != 0:
>           raise RuntimeError(
                """Command "{0}" failed with
                stdout
                ------
                {1}
                stderr
                ------
                {2}
                """.format(cmd, stdout, stderr))
E           RuntimeError: Command "['/usr/bin/python3', '/home/tkloczko/rpmbuild/BUILD/nb2plots-0.6.1/scripts/sphinx2py', '/home/tkloczko/rpmbuild/BUILD/nb2plots-0.6.1/nb2plots/tests/rst_md_files/blockquotes.rst']" failed with
E                           stdout
E                           ------
E                           b''
E                           stderr
E                           ------
E                           b'\x1b[01mRunning Sphinx v7.0.1\x1b[39;49;00m\n\x1b[01mmaking output directory... \x1b[39;49;00mdone\nTraceback (most recent call last):\n  File "/home/tkloczko/rpmbuild/BUILD/nb2plots-0.6.1/scripts/sphinx2py", line 16, in <module>\n    do_main("Convert Sphinx ReST file to Python code", \'python\')\n  File "/home/tkloczko/rpmbuild/BUILDROOT/python-nb2plots-0.6.1-8.fc35.x86_64/usr/lib/python3.8/site-packages/nb2plots/commands.py", line 30, in do_main\n    output = converter.from_rst(contents)\n  File "/home/tkloczko/rpmbuild/BUILDROOT/python-nb2plots-0.6.1-8.fc35.x86_64/usr/lib/python3.8/site-packages/nb2plots/converters.py", line 124, in from_rst\n    doctree, app = self._build_rst(rst_text, resolve)\n  File "/home/tkloczko/rpmbuild/BUILDROOT/python-nb2plots-0.6.1-8.fc35.x86_64/usr/lib/python3.8/site-packages/nb2plots/converters.py", line 78, in _build_rst\n    app = self._make_app(rst_text)\n  File "/home/tkloczko/rpmbuild/BUILDROOT/python-nb2plots-0.6.1-8.fc35.x86_64/usr/lib/python3.8/site-packages/nb2plots/converters.py", line 55, in _make_app\n    return TempApp(rst_text,\n  File "/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py", line 149, in __init__\n    TestApp.__init__(self,\n  File "/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py", line 64, in __init__\n    super(TestApp, self).__init__(*args, **kwargs)\n  File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 262, in __init__\n    self.builder = self.create_builder(buildername)\n  File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 335, in create_builder\n    return self.registry.create_builder(self, name, self.env)\n  File "/usr/lib/python3.8/site-packages/sphinx/registry.py", line 157, in create_builder\n    return self.builders[name](app, env)\nTypeError: __init__() takes 2 positional arguments but 3 were given\n'

/usr/lib/python3.8/site-packages/scripttester/scripttester.py:194: RuntimeError
_____________________________________________________________________________________ test_sphinx2pxml ______________________________________________________________________________________

    @script_test
    def test_sphinx2pxml():
        rst_fname = pjoin(DATA_PATH, 'sect_text.rst')
        cmd = ['sphinx2pxml', rst_fname]
>       code, stdout, stderr = run_command(cmd)

nb2plots/tests/test_scripts.py:90:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <scripttester.scripttester.ScriptTester object at 0x7fba05d6da90>
cmd = ['/usr/bin/python3', '/home/tkloczko/rpmbuild/BUILD/nb2plots-0.6.1/scripts/sphinx2pxml', '/home/tkloczko/rpmbuild/BUILD/nb2plots-0.6.1/nb2plots/tests/rst_md_files/sect_text.rst']
check_code = True

    def run_command(self, cmd, check_code=True):
        """ Run command sequence `cmd` returning exit code, stdout, stderr

        Parameters
        ----------
        cmd : str or sequence
            string with command name or sequence of strings defining command
        check_code : {True, False}, optional
            If True, raise error for non-zero return code

        Returns
        -------
        returncode : int
            return code from execution of `cmd`
        stdout : bytes (python 3) or str (python 2)
            stdout from `cmd`
        stderr : bytes (python 3) or str (python 2)
            stderr from `cmd`
        """
        cmd = [cmd] if isinstance(cmd, string_types) else list(cmd)
        using_sys_path = self.local_script_dir is None
        if not using_sys_path:
            # Windows can't run script files without extensions natively so we need
            # to run local scripts (no extensions) via the Python interpreter.  On
            # Unix, we might have the wrong incantation for the Python interpreter
            # in the hash bang first line in the source file.  So, either way, run
            # the script through the Python interpreter
            cmd = [sys.executable,
                   pjoin(self.local_script_dir, cmd[0])] + cmd[1:]
        elif os.name == 'nt':
            # Must add extension to find on path with Windows
            cmd[0] = cmd[0] + self.win_bin_ext
        if os.name == 'nt':
            # Quote any arguments with spaces. The quotes delimit the arguments
            # on Windows, and the arguments might be file paths with spaces.
            # On Unix the list elements are each separate arguments.
            cmd = ['"{0}"'.format(c) if ' ' in c else c for c in cmd]
        if self.debug_print:
            print("Running command '%s'" % cmd)
        env = os.environ
        if using_sys_path and self.local_module_dir:
            # module likely comes from the current working directory. We might
            # need that directory on the path if we're running the scripts from
            # a temporary directory.
            env = env.copy()  # Modifying env, make temporary copy.
            pypath = env.get('PYTHONPATH', None)
            if pypath is None:
                env['PYTHONPATH'] = self.local_module_dir
            else:
                env['PYTHONPATH'] = self.local_module_dir + pathsep + pypath
        proc = Popen(cmd, stdout=PIPE, stderr=PIPE, env=env)
        stdout, stderr = proc.communicate()
        if proc.poll() == None:
            proc.terminate()
        if check_code and proc.returncode != 0:
>           raise RuntimeError(
                """Command "{0}" failed with
                stdout
                ------
                {1}
                stderr
                ------
                {2}
                """.format(cmd, stdout, stderr))
E           RuntimeError: Command "['/usr/bin/python3', '/home/tkloczko/rpmbuild/BUILD/nb2plots-0.6.1/scripts/sphinx2pxml', '/home/tkloczko/rpmbuild/BUILD/nb2plots-0.6.1/nb2plots/tests/rst_md_files/sect_text.rst']" failed with
E                           stdout
E                           ------
E                           b''
E                           stderr
E                           ------
E                           b'\x1b[01mRunning Sphinx v7.0.1\x1b[39;49;00m\n\x1b[01mmaking output directory... \x1b[39;49;00mdone\n\x1b[01mbuilding [mo]: \x1b[39;49;00mall of 0 po files\n\x1b[01mwriting output... \x1b[39;49;00m\n\x1b[01mbuilding [pseudoxml]: \x1b[39;49;00mall source files\n\x1b[01mupdating environment: \x1b[39;49;00m[new config] 1 added, 0 changed, 0 removed\n\x1b[01mreading sources... \x1b[39;49;00m[100%] \x1b[35mcontents\x1b[39;49;00m                                             \r\n\x1b[01mlooking for now-outdated files... \x1b[39;49;00mnone found\n\x1b[01mpickling environment... \x1b[39;49;00mdone\n\x1b[01mchecking consistency... \x1b[39;49;00mdone\n\x1b[01mpreparing documents... \x1b[39;49;00mdone\n\x1b[01mwriting output... \x1b[39;49;00m[100%] \x1b[32mcontents\x1b[39;49;00m                                              \r\n\x1b[01mbuild succeeded.\x1b[39;49;00m\n\nThe pseudo-XML files are in ../../../../../tmp/tmpniqitrn1/build.\nTraceback (most recent call last):\n  File "/home/tkloczko/rpmbuild/BUILD/nb2plots-0.6.1/scripts/sphinx2pxml", line 16, in <module>\n    do_main("Convert Sphinx ReST file to Pseudo XML", \'pseudoxml\')\n  File "/home/tkloczko/rpmbuild/BUILDROOT/python-nb2plots-0.6.1-8.fc35.x86_64/usr/lib/python3.8/site-packages/nb2plots/commands.py", line 31, in do_main\n    sys.stdout.buffer().write(output.encode(\'utf-8\'))\nTypeError: \'_io.BufferedWriter\' object is not callable\n'

/usr/lib/python3.8/site-packages/scripttester/scripttester.py:194: RuntimeError
____________________________________________________________________________________ test_example_files _____________________________________________________________________________________

    def test_example_files():
        # test sphinx2md script over all .rst files checking against .smd / .md
        # files
        for rst_fname in glob(pjoin(DATA_PATH, '*.rst')):
            rst_contents = fcontents(rst_fname, 't')
            # Try .smd filename first, otherwise ordinary .md
            md_fname = rst_fname[:-3] + 'smd'
            if not exists(md_fname):
                md_fname = rst_fname[:-3] + 'md'
            md_contents = fcontents(md_fname, 't')
>           assert_conv_equal(rst_contents, md_contents)

nb2plots/tests/test_sphinx2md.py:33:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
nb2plots/tests/test_sphinx2md.py:20: in assert_conv_equal
    convert_assert(rst_str, to_md_safe, md_expected, None)
nb2plots/testing/convutils.py:55: in convert_assert
    actual = converter(rst_str)
nb2plots/testing/convutils.py:38: in unsmarted
    return unsmart(converter(rst_str))
nb2plots/converters.py:124: in from_rst
    doctree, app = self._build_rst(rst_text, resolve)
nb2plots/converters.py:78: in _build_rst
    app = self._make_app(rst_text)
nb2plots/converters.py:55: in _make_app
    return TempApp(rst_text,
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:149: in __init__
    TestApp.__init__(self,
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:64: in __init__
    super(TestApp, self).__init__(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/application.py:262: in __init__
    self.builder = self.create_builder(buildername)
/usr/lib/python3.8/site-packages/sphinx/application.py:335: in create_builder
    return self.registry.create_builder(self, name, self.env)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <sphinx.registry.SphinxComponentRegistry object at 0x7fb9e474e6a0>, app = <sphinxtesters.sphinxutils.TempApp object at 0x7fb9e474edf0>, name = 'markdown'
env = <sphinx.environment.BuildEnvironment object at 0x7fb9e474e400>

    def create_builder(self, app: Sphinx, name: str,
                       env: BuildEnvironment | None = None) -> Builder:
        if name not in self.builders:
            raise SphinxError(__('Builder name %s not registered') % name)

>       return self.builders[name](app, env)
E       TypeError: __init__() takes 2 positional arguments but 3 were given

/usr/lib/python3.8/site-packages/sphinx/registry.py:157: TypeError
----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------
Running Sphinx v7.0.1
making output directory... done
__________________________________________________________________________________ test_default_mathdollar __________________________________________________________________________________

    def test_default_mathdollar():
        # Test mathdollar extension present by default.
>       md = to_markdown.from_rst(r'Some text with $a = 1$ math.')

nb2plots/tests/test_sphinx2md.py:38:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
nb2plots/converters.py:124: in from_rst
    doctree, app = self._build_rst(rst_text, resolve)
nb2plots/converters.py:78: in _build_rst
    app = self._make_app(rst_text)
nb2plots/converters.py:55: in _make_app
    return TempApp(rst_text,
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:149: in __init__
    TestApp.__init__(self,
/usr/lib/python3.8/site-packages/sphinxtesters/sphinxutils.py:64: in __init__
    super(TestApp, self).__init__(*args, **kwargs)
/usr/lib/python3.8/site-packages/sphinx/application.py:262: in __init__
    self.builder = self.create_builder(buildername)
/usr/lib/python3.8/site-packages/sphinx/application.py:335: in create_builder
    return self.registry.create_builder(self, name, self.env)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <sphinx.registry.SphinxComponentRegistry object at 0x7fb9e4333e50>, app = <sphinxtesters.sphinxutils.TempApp object at 0x7fb9e4333f70>, name = 'markdown'
env = <sphinx.environment.BuildEnvironment object at 0x7fb9e43332b0>

    def create_builder(self, app: Sphinx, name: str,
                       env: BuildEnvironment | None = None) -> Builder:
        if name not in self.builders:
            raise SphinxError(__('Builder name %s not registered') % name)

>       return self.builders[name](app, env)
E       TypeError: __init__() takes 2 positional arguments but 3 were given

/usr/lib/python3.8/site-packages/sphinx/registry.py:157: TypeError
----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------
Running Sphinx v7.0.1
making output directory... done
===================================================================================== warnings summary ======================================================================================
../../../../../usr/lib/python3.8/site-packages/jupyter_client/connect.py:20
  /usr/lib/python3.8/site-packages/jupyter_client/connect.py:20: DeprecationWarning: Jupyter is migrating its paths to use standard platformdirs
  given by the platformdirs library.  To remove this warning and
  see the appropriate new directories, set the environment variable
  `JUPYTER_PLATFORM_DIRS=1` and then run `jupyter --paths`.
  The use of platformdirs will be the default in `jupyter_core` v6
    from jupyter_core.paths import jupyter_data_dir, jupyter_runtime_dir, secure_write

nb2plots/tests/test_builders.py: 1 warning
nb2plots/tests/test_codelinks.py: 3 warnings
nb2plots/tests/test_mpl_interactive.py: 4 warnings
nb2plots/tests/test_nbplots.py: 45 warnings
nb2plots/tests/test_proj1.py: 6 warnings
nb2plots/tests/test_runroles.py: 8 warnings
nb2plots/tests/test_timeout.py: 12 warnings
  /home/tkloczko/rpmbuild/BUILD/nb2plots-0.6.1/nb2plots/runroles.py:269: PendingDeprecationWarning: nodes.Node.traverse() is obsoleted by Node.findall().
    for ref in doctree.traverse(runrole_reference):

nb2plots/tests/test_nbplots.py::TestWithSkip::test_build_error
nb2plots/tests/test_nbplots.py::TestWithSkipStructure::test_build_error
nb2plots/tests/test_nbplots.py::TestWithSkipDoctest::test_build_error
nb2plots/tests/test_nbplots.py::TestHideShow::test_build_error
nb2plots/tests/test_nbplots.py::TestHideShow::test_build_error
nb2plots/tests/test_nbplots.py::TestHideShowTests::test_build_error
nb2plots/tests/test_nbplots.py::TestHideShowTests::test_build_error
nb2plots/tests/test_nbplots.py::TestHideShowHtml::test_build_error
nb2plots/tests/test_nbplots.py::TestHideShowHtml::test_build_error
  /home/tkloczko/rpmbuild/BUILD/nb2plots-0.6.1/nb2plots/nbplots.py:349: PendingDeprecationWarning: nodes.Node.traverse() is obsoleted by Node.findall().
    for node in tree.traverse(doctest_filter):

nb2plots/tests/test_timeout.py::TestCLOptsTimeout::test_build_error
nb2plots/tests/test_timeout.py::TestConfigCLTimeout::test_build_error
nb2plots/tests/test_timeout.py::TestBestTimeout::test_build_error
  /home/tkloczko/rpmbuild/BUILD/nb2plots-0.6.1/nb2plots/codelinks.py:107: PendingDeprecationWarning: nodes.Node.traverse() is obsoleted by Node.findall().
    for node in node.traverse(runrole_reference):

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================================================================== short test summary info ==================================================================================
ERROR nb2plots/tests/test_builders.py::TestMarkdownBuild::test_build_error - TypeError: __init__() takes 2 positional arguments but 3 were given
ERROR nb2plots/tests/test_builders.py::TestMarkdownBuild::test_output - TypeError: __init__() takes 2 positional arguments but 3 were given
ERROR nb2plots/tests/test_builders.py::TestBasedMarkdownBuild::test_build_error - TypeError: __init__() takes 2 positional arguments but 3 were given
ERROR nb2plots/tests/test_builders.py::TestBasedMarkdownBuild::test_output - TypeError: __init__() takes 2 positional arguments but 3 were given
ERROR nb2plots/tests/test_builders.py::TestPythonBuild::test_build_error - TypeError: __init__() takes 2 positional arguments but 3 were given
ERROR nb2plots/tests/test_builders.py::TestPythonBuild::test_output - TypeError: __init__() takes 2 positional arguments but 3 were given
ERROR nb2plots/tests/test_builders.py::TestBasedPythonBuild::test_build_error - TypeError: __init__() takes 2 positional arguments but 3 were given
ERROR nb2plots/tests/test_builders.py::TestBasedPythonBuild::test_output - TypeError: __init__() takes 2 positional arguments but 3 were given
ERROR nb2plots/tests/test_builders.py::TestLatexBuild::test_build_error - RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 requ...
ERROR nb2plots/tests/test_builders.py::TestLatexBuild::test_output - RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 requ...
ERROR nb2plots/tests/test_codelinks.py::TestSubdirCodeLinks::test_build_error - RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 requ...
ERROR nb2plots/tests/test_codelinks.py::TestSubdirCodeLinks::test_output - RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 requ...
ERROR nb2plots/tests/test_nbplots.py::TestClearNotebook::test_build_error - RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 requ...
ERROR nb2plots/tests/test_nbplots.py::TestClearNotebook::test_pages - RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 requ...
ERROR nb2plots/tests/test_proj1.py::TestProj1::test_build_error - RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 requ...
ERROR nb2plots/tests/test_proj1.py::TestProj1::test_basic_build - RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 requ...
ERROR nb2plots/tests/test_proj1.py::TestNotSameName::test_build_error - RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 requ...
ERROR nb2plots/tests/test_runroles.py::TestSubdirBuild::test_build_error - RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 requ...
ERROR nb2plots/tests/test_runroles.py::TestSubdirBuild::test_output - RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 requ...
ERROR nb2plots/tests/test_runroles.py::TestPyfileAlias::test_build_error - RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 requ...
ERROR nb2plots/tests/test_runroles.py::TestPyfileAlias::test_output - RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 requ...
ERROR nb2plots/tests/test_runroles.py::TestDuplicatesOK::test_build_error - RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 requ...
ERROR nb2plots/tests/test_runroles.py::TestDuplicatesOK::test_output - RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 requ...
ERROR nb2plots/tests/test_timeout.py::TestNoTimeout::test_build_error - RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 requ...
ERROR nb2plots/tests/test_timeout.py::TestNoTimeout::test_output - RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 requ...
ERROR nb2plots/tests/test_timeout.py::TestConfigCLTimeout::test_build_error - RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 requ...
ERROR nb2plots/tests/test_timeout.py::TestConfigCLTimeout::test_output - RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 requ...
ERROR nb2plots/tests/test_timeout.py::TestBestTimeout::test_build_error - RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 requ...
ERROR nb2plots/tests/test_timeout.py::TestBestTimeout::test_output - RuntimeError: page build failed with build error Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 requ...
FAILED nb2plots/tests/test_codelinks.py::test_codelinks - sphinx.errors.ExtensionError: Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 required positional arg...
FAILED nb2plots/tests/test_doctree2nb.py::test_basic - TypeError: __init__() takes 2 positional arguments but 3 were given
FAILED nb2plots/tests/test_doctree2nb.py::test_runrole_reference - TypeError: __init__() takes 2 positional arguments but 3 were given
FAILED nb2plots/tests/test_doctree2nb.py::test_only - TypeError: __init__() takes 2 positional arguments but 3 were given
FAILED nb2plots/tests/test_doctree2nb.py::test_doctests - TypeError: __init__() takes 2 positional arguments but 3 were given
FAILED nb2plots/tests/test_doctree2nb.py::test_nbplots - TypeError: __init__() takes 2 positional arguments but 3 were given
FAILED nb2plots/tests/test_doctree2nb.py::test_example_files - TypeError: __init__() takes 2 positional arguments but 3 were given
FAILED nb2plots/tests/test_doctree2nb.py::test_notebook_basic - TypeError: __init__() takes 2 positional arguments but 3 were given
FAILED nb2plots/tests/test_doctree2nb.py::test_default_mathdollar - TypeError: __init__() takes 2 positional arguments but 3 were given
FAILED nb2plots/tests/test_doctree2py.py::test_example_files - TypeError: __init__() takes 2 positional arguments but 3 were given
FAILED nb2plots/tests/test_regression.py::test_regression - TypeError: __init__() takes 2 positional arguments but 3 were given
FAILED nb2plots/tests/test_runroles.py::test_runrole_doctrees - sphinx.errors.ExtensionError: Handler <function write_runfiles at 0x7fba05dd23a0> for event 'build-finished' threw an exception (exception: __init__() missing 1 required positional arg...
FAILED nb2plots/tests/test_scripts.py::test_sphinx2md - RuntimeError: Command "['/usr/bin/python3', '/home/tkloczko/rpmbuild/BUILD/nb2plots-0.6.1/scripts/sphinx2md', '/home/tkloczko/rpmbuild/BUILD/nb2plots-0.6.1/nb2plots/tests/rst_md_files/...
FAILED nb2plots/tests/test_scripts.py::test_sphinx2nb - RuntimeError: Command "['/usr/bin/python3', '/home/tkloczko/rpmbuild/BUILD/nb2plots-0.6.1/scripts/sphinx2nb', '/home/tkloczko/rpmbuild/BUILD/nb2plots-0.6.1/nb2plots/tests/rst_md_files/...
FAILED nb2plots/tests/test_scripts.py::test_sphinx2py - RuntimeError: Command "['/usr/bin/python3', '/home/tkloczko/rpmbuild/BUILD/nb2plots-0.6.1/scripts/sphinx2py', '/home/tkloczko/rpmbuild/BUILD/nb2plots-0.6.1/nb2plots/tests/rst_md_files/...
FAILED nb2plots/tests/test_scripts.py::test_sphinx2pxml - RuntimeError: Command "['/usr/bin/python3', '/home/tkloczko/rpmbuild/BUILD/nb2plots-0.6.1/scripts/sphinx2pxml', '/home/tkloczko/rpmbuild/BUILD/nb2plots-0.6.1/nb2plots/tests/rst_md_file...
FAILED nb2plots/tests/test_sphinx2md.py::test_example_files - TypeError: __init__() takes 2 positional arguments but 3 were given
FAILED nb2plots/tests/test_sphinx2md.py::test_default_mathdollar - TypeError: __init__() takes 2 positional arguments but 3 were given
============================================================= 18 failed, 70 passed, 92 warnings, 29 errors in 71.24s (0:01:11) ==============================================================

Here is list of installed modules in build env

Package                       Version
----------------------------- --------
alabaster                     0.7.13
asttokens                     2.2.1
attrs                         23.1.0
Babel                         2.12.1
backcall                      0.2.0
beautifulsoup4                4.12.2
bleach                        6.0.0
build                         0.10.0
charset-normalizer            3.2.0
comm                          0.1.2
contourpy                     1.0.7
cycler                        0.11.0
debugpy                       1.6.7
decorator                     5.1.1
defusedxml                    0.7.1
distro                        1.8.0
docutils                      0.20.1
exceptiongroup                1.1.1
executing                     1.2.0
fastjsonschema                2.18.0
fonttools                     4.42.0
gpg                           1.20.0
html5lib                      1.1
idna                          3.4
imagesize                     1.4.1
importlib-metadata            6.8.0
importlib-resources           6.0.1
iniconfig                     2.0.0
installer                     0.7.0
ipykernel                     6.25.1
ipython                       8.12.0
jedi                          0.18.2
Jinja2                        3.1.2
jsonschema                    4.19.0
jsonschema-specifications     2023.7.1
jupyter_client                8.3.0
jupyter_core                  5.3.1
jupyterlab-pygments           0.1.2
kiwisolver                    1.4.4
libcomps                      0.1.19
MarkupSafe                    2.1.3
matplotlib                    3.6.3
matplotlib-inline             0.1.6
mistune                       2.0.5
nbclient                      0.8.0
nbconvert                     7.7.4
nbformat                      5.9.2
nest-asyncio                  1.5.7
numpy                         1.24.4
numpydoc                      1.5.0
olefile                       0.46
packaging                     23.1
pandocfilters                 1.5.0
parso                         0.8.3
pexpect                       4.8.0
pickleshare                   0.7.5
Pillow                        10.0.0
pkgutil_resolve_name          1.3.10
platformdirs                  3.10.0
pluggy                        1.2.0
prompt-toolkit                3.0.38
psutil                        5.9.5
ptyprocess                    0.7.0
pure-eval                     0.2.2
Pygments                      2.16.0
pyparsing                     3.1.1
pyproject_hooks               1.0.0
pytest                        7.4.0
python-dateutil               2.8.2
pytz                          2023.2
pyzmq                         25.1.0
referencing                   0.30.2
requests                      2.31.0
rpds-py                       0.9.2
scripttester                  0.1
setuptools                    68.0.0
six                           1.16.0
snowballstemmer               2.2.0
soupsieve                     2.4.1
Sphinx                        7.0.1
sphinxcontrib-applehelp       1.0.4
sphinxcontrib-devhelp         1.0.2
sphinxcontrib-htmlhelp        2.0.3
sphinxcontrib-jsmath          1.0.1
sphinxcontrib-qthelp          1.0.3
sphinxcontrib-serializinghtml 1.1.5
sphinxtesters                 0.2.3
stack-data                    0.6.2
texext                        0.6.7
tinycss2                      1.2.1
tomli                         2.0.1
tornado                       6.3.3
traitlets                     5.9.0
typing_extensions             4.7.1
urllib3                       1.26.15
wcwidth                       0.2.6
webencodings                  0.5.1
wheel                         0.41.1
zipp                          3.16.2

@matthew-brett
Copy link
Owner

I'm working on this over at #29

@kloczek
Copy link
Author

kloczek commented Aug 19, 2023

Just tested pytest with #29 and it works now as well (with PendingDeprecationWarning warnings)

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-nb2plots-0.6.1-8.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-nb2plots-0.6.1-8.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network'
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.17, pytest-7.4.0, pluggy-1.2.0
rootdir: /home/tkloczko/rpmbuild/BUILD/nb2plots-0.6.1
plugins: isort-3.1.0, repeat-0.9.1, mock-3.11.1
collected 117 items

nb2plots/tests/test_builders.py ..........                                                                                                                                            [  8%]
nb2plots/tests/test_codelinks.py ...                                                                                                                                                  [ 11%]
nb2plots/tests/test_config.py .                                                                                                                                                       [ 11%]
nb2plots/tests/test_converters.py .                                                                                                                                                   [ 12%]
nb2plots/tests/test_doctree2md.py .....                                                                                                                                               [ 17%]
nb2plots/tests/test_doctree2nb.py ........                                                                                                                                            [ 23%]
nb2plots/tests/test_doctree2py.py ..                                                                                                                                                  [ 25%]
nb2plots/tests/test_from_notebook.py ......                                                                                                                                           [ 30%]
nb2plots/tests/test_mpl_interactive.py .                                                                                                                                              [ 31%]
nb2plots/tests/test_nbplots.py ...............................................                                                                                                        [ 71%]
nb2plots/tests/test_proj1.py .....                                                                                                                                                    [ 76%]
nb2plots/tests/test_regression.py .                                                                                                                                                   [ 76%]
nb2plots/tests/test_runroles.py ..........                                                                                                                                            [ 85%]
nb2plots/tests/test_scripts.py .....                                                                                                                                                  [ 89%]
nb2plots/tests/test_sphinx2md.py ..                                                                                                                                                   [ 91%]
nb2plots/tests/test_strdiff.py .                                                                                                                                                      [ 92%]
nb2plots/tests/test_timeout.py .........                                                                                                                                              [100%]

===================================================================================== warnings summary ======================================================================================
../../../../../usr/lib/python3.8/site-packages/jupyter_client/connect.py:20
  /usr/lib/python3.8/site-packages/jupyter_client/connect.py:20: DeprecationWarning: Jupyter is migrating its paths to use standard platformdirs
  given by the platformdirs library.  To remove this warning and
  see the appropriate new directories, set the environment variable
  `JUPYTER_PLATFORM_DIRS=1` and then run `jupyter --paths`.
  The use of platformdirs will be the default in `jupyter_core` v6
    from jupyter_core.paths import jupyter_data_dir, jupyter_runtime_dir, secure_write

nb2plots/tests/test_builders.py: 19 warnings
nb2plots/tests/test_codelinks.py: 17 warnings
nb2plots/tests/test_doctree2nb.py: 66 warnings
nb2plots/tests/test_doctree2py.py: 38 warnings
nb2plots/tests/test_mpl_interactive.py: 4 warnings
nb2plots/tests/test_nbplots.py: 46 warnings
nb2plots/tests/test_proj1.py: 9 warnings
nb2plots/tests/test_regression.py: 4 warnings
nb2plots/tests/test_runroles.py: 47 warnings
nb2plots/tests/test_sphinx2md.py: 40 warnings
nb2plots/tests/test_timeout.py: 20 warnings
  /home/tkloczko/rpmbuild/BUILD/nb2plots-0.6.1/nb2plots/runroles.py:269: PendingDeprecationWarning: nodes.Node.traverse() is obsoleted by Node.findall().
    for ref in doctree.traverse(runrole_reference):

nb2plots/tests/test_nbplots.py::TestWithSkip::test_build_error
nb2plots/tests/test_nbplots.py::TestWithSkipStructure::test_build_error
nb2plots/tests/test_nbplots.py::TestWithSkipDoctest::test_build_error
nb2plots/tests/test_nbplots.py::TestHideShow::test_build_error
nb2plots/tests/test_nbplots.py::TestHideShow::test_build_error
nb2plots/tests/test_nbplots.py::TestHideShowTests::test_build_error
nb2plots/tests/test_nbplots.py::TestHideShowTests::test_build_error
nb2plots/tests/test_nbplots.py::TestHideShowHtml::test_build_error
nb2plots/tests/test_nbplots.py::TestHideShowHtml::test_build_error
  /home/tkloczko/rpmbuild/BUILD/nb2plots-0.6.1/nb2plots/nbplots.py:349: PendingDeprecationWarning: nodes.Node.traverse() is obsoleted by Node.findall().
    for node in tree.traverse(doctest_filter):

nb2plots/tests/test_timeout.py::TestCLOptsTimeout::test_build_error
nb2plots/tests/test_timeout.py::TestConfigCLTimeout::test_build_error
nb2plots/tests/test_timeout.py::TestBestTimeout::test_build_error
  /home/tkloczko/rpmbuild/BUILD/nb2plots-0.6.1/nb2plots/codelinks.py:107: PendingDeprecationWarning: nodes.Node.traverse() is obsoleted by Node.findall().
    for node in node.traverse(runrole_reference):

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================================================================= 117 passed, 323 warnings in 201.78s (0:03:21) =======================================================================

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants