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

1.13.6: pytest is failing (relaxed jupyter_packaging dependencies) #906

Open
kloczek opened this issue Jan 26, 2022 · 14 comments
Open

1.13.6: pytest is failing (relaxed jupyter_packaging dependencies) #906

kloczek opened this issue Jan 26, 2022 · 14 comments
Milestone

Comments

@kloczek
Copy link

kloczek commented Jan 26, 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>

Because I'm trying to build all my packages only agains what is installed (--no-isolation) and I have jupyter-packaging 0.11.1 I've added the patch:

--- a/pyproject.toml~   2022-01-11 08:23:50.000000000 +0000
+++ b/pyproject.toml    2022-01-25 20:24:23.103617304 +0000
@@ -1,5 +1,5 @@
 [build-system]
-requires = ["jupyter_packaging~=0.7.9", "jupyterlab>=3.0.0,==3.*", "setuptools>=40.8.0", "wheel"]
+requires = ["jupyter_packaging>=0.7.9", "jupyterlab>=3.0.0,==3.*", "setuptools>=40.8.0", "wheel"]
 build-backend = "setuptools.build_meta"
 [tool.pytest.ini_options]
 filterwarnings = [

I'm not sure is that caused that pytest is failing. Latest pytets shows at the end few minor warnings.
Here is pytest output:

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-jupytext-1.13.6-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-jupytext-1.13.6-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.12, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6, configfile: pyproject.toml
plugins: anyio-3.3.4, black-0.3.12
collected 2708 items

tests/test_active_cells.py ............................                                                                                                              [  1%]
tests/test_auto_ext.py ..............................................................x.s.......................                                                      [  4%]
tests/test_black.py ...ssF.......                                                                                                                                    [  4%]
tests/test_cell_id.py .                                                                                                                                              [  4%]
tests/test_cell_markers.py ..                                                                                                                                        [  4%]
tests/test_cell_metadata.py ............................................................                                                                             [  7%]
tests/test_cells.py ................                                                                                                                                 [  7%]
tests/test_changelog.py ...                                                                                                                                          [  7%]
tests/test_cli.py .................................................................................................................................................. [ 13%]
..........FFFF.................................................................................................................................................FF... [ 19%]
s...........................................................................FFFFF..........s................                                                         [ 23%]
tests/test_cli_check.py ..                                                                                                                                           [ 23%]
tests/test_cli_config.py ...........                                                                                                                                 [ 23%]
tests/test_cm_config.py ..............                                                                                                                               [ 24%]
tests/test_combine.py ...................................................                                                                                            [ 26%]
tests/test_compare.py .....................                                                                                                                          [ 26%]
tests/test_config.py ..................                                                                                                                              [ 27%]
tests/test_contentsmanager.py ....................................................................sssssss........................................................... [ 32%]
.................................................................................................................................................................... [ 38%]
......................................................................................................................................F..s.......................... [ 44%]
...........ss                                                                                                                                                        [ 45%]
tests/test_custom_cell_magics.py .                                                                                                                                   [ 45%]
tests/test_doc_files_are_notebooks.py ...............                                                                                                                [ 45%]
tests/test_doxygen.py ..........                                                                                                                                     [ 46%]
tests/test_escape_magics.py ................................................................................                                                         [ 49%]
tests/test_execute.py ..FFFFsF                                                                                                                                       [ 49%]
tests/test_formats.py ............................                                                                                                                   [ 50%]
tests/test_header.py ..........                                                                                                                                      [ 50%]
tests/test_hide_remove_input_outputs_rmarkdown.py ........                                                                                                           [ 50%]
tests/test_invalid_file.py ...                                                                                                                                       [ 51%]
tests/test_ipynb_to_R.py ....                                                                                                                                        [ 51%]
tests/test_ipynb_to_myst.py .......ss...                                                                                                                             [ 51%]
tests/test_ipynb_to_py.py ....................                                                                                                                       [ 52%]
tests/test_ipynb_to_rmd.py ........................                                                                                                                  [ 53%]
tests/test_isort.py s                                                                                                                                                [ 53%]
tests/test_jupytext_errors.py ..                                                                                                                                     [ 53%]
tests/test_jupytext_nbconvert_round_trip.py .......................                                                                                                  [ 54%]
tests/test_jupytext_read.py ..                                                                                                                                       [ 54%]
tests/test_knitr_spin.py .                                                                                                                                           [ 54%]
tests/test_load_multiple.py ..                                                                                                                                       [ 54%]
tests/test_markdown_in_code_cells.py ....                                                                                                                            [ 54%]
tests/test_metadata_filter.py .................                                                                                                                      [ 55%]
tests/test_metadata_filters_from_config.py .                                                                                                                         [ 55%]
tests/test_mirror.py ............................................................................................................................................... [ 60%]
.......................................................................................FFFFFFFFFFFFFFFFFsssssss...........................................ssssssssss [ 66%]
s...............ss....................................................................................................                                               [ 70%]
tests/test_nbformat_version.py .......                                                                                                                               [ 71%]
tests/test_paired_paths.py ......................                                                                                                                    [ 72%]
tests/test_pep8.py .............................................................................................................................                     [ 76%]
tests/test_pre_commit_0_ipynb_to_py.py s                                                                                                                             [ 76%]
tests/test_pre_commit_1_sync.py s                                                                                                                                    [ 76%]
tests/test_pre_commit_1_sync_with_config.py s                                                                                                                        [ 76%]
tests/test_pre_commit_2_sync_nbstripout.py s                                                                                                                         [ 76%]
tests/test_pre_commit_3_sync_black_nbstripout.py s                                                                                                                   [ 76%]
tests/test_pre_commit_4_sync_execute.py s                                                                                                                            [ 76%]
tests/test_pre_commit_5_reformat_markdown.py s                                                                                                                       [ 76%]
tests/test_pre_commit_mode.py ............                                                                                                                           [ 77%]
tests/test_pre_commit_scripts.py ....s...                                                                                                                            [ 77%]
tests/test_preserve_empty_cells.py .......                                                                                                                           [ 77%]
tests/test_pytest.py ..                                                                                                                                              [ 77%]
tests/test_raw_strings.py .........                                                                                                                                  [ 78%]
tests/test_read_all_py.py ....................................................................................................................                       [ 82%]
tests/test_read_dotnet_try_markdown.py ...                                                                                                                           [ 82%]
tests/test_read_empty_text_notebook.py .......................s...........                                                                                           [ 84%]
tests/test_read_folding_markers.py .....                                                                                                                             [ 84%]
tests/test_read_incomplete_rmd.py ...                                                                                                                                [ 84%]
tests/test_read_simple_R.py ............                                                                                                                             [ 84%]
tests/test_read_simple_clojure.py .                                                                                                                                  [ 84%]
tests/test_read_simple_csharp.py .......                                                                                                                             [ 85%]
tests/test_read_simple_groovy.py .                                                                                                                                   [ 85%]
tests/test_read_simple_hydrogen.py .......                                                                                                                           [ 85%]
tests/test_read_simple_ipynb.py .                                                                                                                                    [ 85%]
tests/test_read_simple_java.py .                                                                                                                                     [ 85%]
tests/test_read_simple_julia.py .                                                                                                                                    [ 85%]
tests/test_read_simple_markdown.py ....................................                                                                                              [ 86%]
tests/test_read_simple_matlab.py ..                                                                                                                                  [ 86%]
tests/test_read_simple_nomarker.py ..                                                                                                                                [ 86%]
tests/test_read_simple_ocaml.py ..                                                                                                                                   [ 87%]
tests/test_read_simple_pandoc.py ....s                                                                                                                               [ 87%]
tests/test_read_simple_percent.py ......................                                                                                                             [ 87%]
tests/test_read_simple_python.py ................................................                                                                                    [ 89%]
tests/test_read_simple_quarto.py s                                                                                                                                   [ 89%]
tests/test_read_simple_rmd.py ..........                                                                                                                             [ 90%]
tests/test_read_simple_rust.py ...                                                                                                                                   [ 90%]
tests/test_read_simple_scheme.py .                                                                                                                                   [ 90%]
tests/test_read_simple_sphinx.py ...                                                                                                                                 [ 90%]
tests/test_read_write_functions.py .....                                                                                                                             [ 90%]
tests/test_rmd_to_ipynb.py ......                                                                                                                                    [ 90%]
tests/test_save_multiple.py .....................................................                                                                                    [ 92%]
tests/test_stringparser.py ....                                                                                                                                      [ 92%]
tests/test_trust_notebook.py .................................................                                                                                       [ 94%]
tests/test_unicode.py ...............................                                                                                                                [ 95%]
tests/test_using_cli.py F                                                                                                                                            [ 95%]
tests/test_write_does_not_modify_notebook.py ..............................................................................................................          [100%]

================================================================================= FAILURES =================================================================================
_________________ test_apply_black_through_jupytext[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/Line_breaks_in_LateX_305.ipynb] _________________

tmpdir = local('/tmp/pytest-of-tkloczko/pytest-128/test_apply_black_through_jupyt0')
nb_file = '/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/Line_breaks_in_LateX_305.ipynb'

    @requires_black
    @pytest.mark.parametrize("nb_file", list_notebooks("ipynb_py")[:1])
    def test_apply_black_through_jupytext(tmpdir, nb_file):
        # Load real notebook metadata to get the 'auto' extension in --pipe-fmt to work
        metadata = read(nb_file).metadata

        nb_org = new_notebook(
            cells=[new_code_cell("1        +1", id="cell-id")], metadata=metadata
        )
        nb_black = new_notebook(
            cells=[new_code_cell("1 + 1", id="cell-id")], metadata=metadata
        )

        tmp_ipynb = str(tmpdir.mkdir("notebook_folder").join("notebook.ipynb"))
        tmp_py = str(tmpdir.mkdir("script_folder").join("notebook.py"))

        # Black in place
        write(nb_org, tmp_ipynb)
        jupytext([tmp_ipynb, "--pipe", "black"])
        nb_now = read(tmp_ipynb)
        compare_notebooks(nb_now, nb_black, compare_ids=True)

        # Write to another folder using dots
        write(nb_org, tmp_ipynb)
        jupytext([tmp_ipynb, "--to", "../script_folder//py:percent", "--pipe", "black"])
        assert os.path.isfile(tmp_py)
        nb_now = read(tmp_py)
        nb_now.metadata = metadata
        compare_notebooks(nb_now, nb_black)
        os.remove(tmp_py)

        # Map to another folder based on file name
        write(nb_org, tmp_ipynb)
>       jupytext(
            [
                tmp_ipynb,
                "--from",
                "notebook_folder//ipynb",
                "--to",
                "script_folder//py:percent",
                "--pipe",
                "black",
                "--check",
                "flake8",
            ]
        )

tests/test_black.py:124:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
jupytext/cli.py:489: in jupytext
    exit_code += jupytext_single_file(nb_file, args, log)
jupytext/cli.py:669: in jupytext_single_file
    pipe_notebook(
jupytext/cli.py:1191: in pipe_notebook
    cmd_output = exec_command(
jupytext/cli.py:1113: in exec_command
    process = subprocess.Popen(
/usr/lib64/python3.8/subprocess.py:858: in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <subprocess.Popen object at 0x7f0b2f89d850>, args = ['flake8', '-'], executable = b'flake8', preexec_fn = None, close_fds = True, pass_fds = (), cwd = None
env = None, startupinfo = None, creationflags = 0, shell = False, p2cread = 14, p2cwrite = 15, c2pread = 16, c2pwrite = 17, errread = -1, errwrite = -1
restore_signals = True, start_new_session = False

    def _execute_child(self, args, executable, preexec_fn, close_fds,
                       pass_fds, cwd, env,
                       startupinfo, creationflags, shell,
                       p2cread, p2cwrite,
                       c2pread, c2pwrite,
                       errread, errwrite,
                       restore_signals, start_new_session):
        """Execute program (POSIX version)"""

        if isinstance(args, (str, bytes)):
            args = [args]
        elif isinstance(args, os.PathLike):
            if shell:
                raise TypeError('path-like args is not allowed when '
                                'shell is true')
            args = [args]
        else:
            args = list(args)

        if shell:
            # On Android the default shell is at '/system/bin/sh'.
            unix_shell = ('/system/bin/sh' if
                      hasattr(sys, 'getandroidapilevel') else '/bin/sh')
            args = [unix_shell, "-c"] + args
            if executable:
                args[0] = executable

        if executable is None:
            executable = args[0]

        sys.audit("subprocess.Popen", executable, args, cwd, env)

        if (_USE_POSIX_SPAWN
                and os.path.dirname(executable)
                and preexec_fn is None
                and not close_fds
                and not pass_fds
                and cwd is None
                and (p2cread == -1 or p2cread > 2)
                and (c2pwrite == -1 or c2pwrite > 2)
                and (errwrite == -1 or errwrite > 2)
                and not start_new_session):
            self._posix_spawn(args, executable, env, restore_signals,
                              p2cread, p2cwrite,
                              c2pread, c2pwrite,
                              errread, errwrite)
            return

        orig_executable = executable

        # For transferring possible exec failure from child to parent.
        # Data format: "exception name:hex errno:description"
        # Pickle is not used; it is complex and involves memory allocation.
        errpipe_read, errpipe_write = os.pipe()
        # errpipe_write must not be in the standard io 0, 1, or 2 fd range.
        low_fds_to_close = []
        while errpipe_write < 3:
            low_fds_to_close.append(errpipe_write)
            errpipe_write = os.dup(errpipe_write)
        for low_fd in low_fds_to_close:
            os.close(low_fd)
        try:
            try:
                # We must avoid complex work that could involve
                # malloc or free in the child process to avoid
                # potential deadlocks, thus we do all this here.
                # and pass it to fork_exec()

                if env is not None:
                    env_list = []
                    for k, v in env.items():
                        k = os.fsencode(k)
                        if b'=' in k:
                            raise ValueError("illegal environment variable name")
                        env_list.append(k + b'=' + os.fsencode(v))
                else:
                    env_list = None  # Use execv instead of execve.
                executable = os.fsencode(executable)
                if os.path.dirname(executable):
                    executable_list = (executable,)
                else:
                    # This matches the behavior of os._execvpe().
                    executable_list = tuple(
                        os.path.join(os.fsencode(dir), executable)
                        for dir in os.get_exec_path(env))
                fds_to_keep = set(pass_fds)
                fds_to_keep.add(errpipe_write)
                self.pid = _posixsubprocess.fork_exec(
                        args, executable_list,
                        close_fds, tuple(sorted(map(int, fds_to_keep))),
                        cwd, env_list,
                        p2cread, p2cwrite, c2pread, c2pwrite,
                        errread, errwrite,
                        errpipe_read, errpipe_write,
                        restore_signals, start_new_session, preexec_fn)
                self._child_created = True
            finally:
                # be sure the FD is closed no matter what
                os.close(errpipe_write)

            self._close_pipe_fds(p2cread, p2cwrite,
                                 c2pread, c2pwrite,
                                 errread, errwrite)

            # Wait for exec to fail or succeed; possibly raising an
            # exception (limited in size)
            errpipe_data = bytearray()
            while True:
                part = os.read(errpipe_read, 50000)
                errpipe_data += part
                if not part or len(errpipe_data) > 50000:
                    break
        finally:
            # be sure the FD is closed no matter what
            os.close(errpipe_read)

        if errpipe_data:
            try:
                pid, sts = os.waitpid(self.pid, 0)
                if pid == self.pid:
                    self._handle_exitstatus(sts)
                else:
                    self.returncode = sys.maxsize
            except ChildProcessError:
                pass

            try:
                exception_name, hex_errno, err_msg = (
                        errpipe_data.split(b':', 2))
                # The encoding here should match the encoding
                # written in by the subprocess implementations
                # like _posixsubprocess
                err_msg = err_msg.decode()
            except ValueError:
                exception_name = b'SubprocessError'
                hex_errno = b'0'
                err_msg = 'Bad exception data from child: {!r}'.format(
                              bytes(errpipe_data))
            child_exception_type = getattr(
                    builtins, exception_name.decode('ascii'),
                    SubprocessError)
            if issubclass(child_exception_type, OSError) and hex_errno:
                errno_num = int(hex_errno, 16)
                child_exec_never_called = (err_msg == "noexec")
                if child_exec_never_called:
                    err_msg = ""
                    # The error must be from chdir(cwd).
                    err_filename = cwd
                else:
                    err_filename = orig_executable
                if errno_num != 0:
                    err_msg = os.strerror(errno_num)
>               raise child_exception_type(errno_num, err_msg, err_filename)
E               FileNotFoundError: [Errno 2] No such file or directory: 'flake8'

/usr/lib64/python3.8/subprocess.py:1704: FileNotFoundError
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
[jupytext] Reading /tmp/pytest-of-tkloczko/pytest-128/test_apply_black_through_jupyt0/notebook_folder/notebook.ipynb in format ipynb
[jupytext] Executing black -
[jupytext] Writing /tmp/pytest-of-tkloczko/pytest-128/test_apply_black_through_jupyt0/notebook_folder/notebook.ipynb
[jupytext] Reading /tmp/pytest-of-tkloczko/pytest-128/test_apply_black_through_jupyt0/notebook_folder/notebook.ipynb in format ipynb
[jupytext] Executing black -
[jupytext] Writing /tmp/pytest-of-tkloczko/pytest-128/test_apply_black_through_jupyt0/script_folder/notebook.py in format ../script_folder//py:percent
[jupytext] Reading /tmp/pytest-of-tkloczko/pytest-128/test_apply_black_through_jupyt0/notebook_folder/notebook.ipynb in format notebook_folder//ipynb
[jupytext] Executing black -
[jupytext] Executing flake8 -
--------------------------------------------------------------------------- Captured stderr call ---------------------------------------------------------------------------
reformatted -
All done! ✨ 🍰 ✨
1 file reformatted.
reformatted -
All done! ✨ 🍰 ✨
1 file reformatted.
reformatted -
All done! ✨ 🍰 ✨
1 file reformatted.
______________________________ test_set_kernel_inplace[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/python/light_sample.py] _______________________________

py_file = '/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/python/light_sample.py'
tmpdir = local('/tmp/pytest-of-tkloczko/pytest-128/test_set_kernel_inplace__home_0')

    @pytest.mark.parametrize("py_file", list_notebooks("python"))
    def test_set_kernel_inplace(py_file, tmpdir):
        tmp_py = str(tmpdir.join("notebook.py"))

        copyfile(py_file, tmp_py)

>       jupytext([tmp_py, "--set-kernel", "-"])

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_cli.py:448:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/cli.py:489: in jupytext
    exit_code += jupytext_single_file(nb_file, args, log)
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/cli.py:593: in jupytext_single_file
    kernelspec = kernelspec_from_language(language)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

language = 'python'

    def kernelspec_from_language(language):
        """Return the python kernel that matches the current env, or the first kernel that matches the given language"""
        if language == "python":
            # Return the kernel that matches the current Python executable
            for name in find_kernel_specs():
                kernel_specs = get_kernel_spec(name)
                cmd = kernel_specs.argv[0]
                if (
                    kernel_specs.language == "python"
                    and os.path.isfile(cmd)
                    and os.path.samefile(cmd, sys.executable)
                ):
                    return {
                        "name": name,
                        "language": language,
                        "display_name": kernel_specs.display_name,
                    }
>           raise ValueError(
                "No kernel found that matches the current python executable {}\n".format(
                    sys.executable
                )
                + "Install one with 'python -m ipykernel install --name kernel_name [--user]'"
            )
E           ValueError: No kernel found that matches the current python executable /usr/bin/python3
E           Install one with 'python -m ipykernel install --name kernel_name [--user]'

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/kernels.py:46: ValueError
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
[jupytext] Reading /tmp/pytest-of-tkloczko/pytest-128/test_set_kernel_inplace__home_0/notebook.py in format py
_________________________ test_set_kernel_inplace[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/python/python_notebook_sample.py] __________________________

py_file = '/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/python/python_notebook_sample.py'
tmpdir = local('/tmp/pytest-of-tkloczko/pytest-128/test_set_kernel_inplace__home_1')

    @pytest.mark.parametrize("py_file", list_notebooks("python"))
    def test_set_kernel_inplace(py_file, tmpdir):
        tmp_py = str(tmpdir.join("notebook.py"))

        copyfile(py_file, tmp_py)

>       jupytext([tmp_py, "--set-kernel", "-"])

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_cli.py:448:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/cli.py:489: in jupytext
    exit_code += jupytext_single_file(nb_file, args, log)
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/cli.py:593: in jupytext_single_file
    kernelspec = kernelspec_from_language(language)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

language = 'python'

    def kernelspec_from_language(language):
        """Return the python kernel that matches the current env, or the first kernel that matches the given language"""
        if language == "python":
            # Return the kernel that matches the current Python executable
            for name in find_kernel_specs():
                kernel_specs = get_kernel_spec(name)
                cmd = kernel_specs.argv[0]
                if (
                    kernel_specs.language == "python"
                    and os.path.isfile(cmd)
                    and os.path.samefile(cmd, sys.executable)
                ):
                    return {
                        "name": name,
                        "language": language,
                        "display_name": kernel_specs.display_name,
                    }
>           raise ValueError(
                "No kernel found that matches the current python executable {}\n".format(
                    sys.executable
                )
                + "Install one with 'python -m ipykernel install --name kernel_name [--user]'"
            )
E           ValueError: No kernel found that matches the current python executable /usr/bin/python3
E           Install one with 'python -m ipykernel install --name kernel_name [--user]'

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/kernels.py:46: ValueError
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
[jupytext] Reading /tmp/pytest-of-tkloczko/pytest-128/test_set_kernel_inplace__home_1/notebook.py in format py
________________________________ test_set_kernel_auto[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/python/light_sample.py] ________________________________

py_file = '/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/python/light_sample.py'
tmpdir = local('/tmp/pytest-of-tkloczko/pytest-128/test_set_kernel_auto__home_tkl0')

    @pytest.mark.parametrize("py_file", list_notebooks("python"))
    def test_set_kernel_auto(py_file, tmpdir):
        tmp_py = str(tmpdir.join("notebook.py"))
        tmp_ipynb = str(tmpdir.join("notebook.ipynb"))

        copyfile(py_file, tmp_py)

>       jupytext(["--to", "ipynb", tmp_py, "--set-kernel", "-"])

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_cli.py:463:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/cli.py:489: in jupytext
    exit_code += jupytext_single_file(nb_file, args, log)
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/cli.py:593: in jupytext_single_file
    kernelspec = kernelspec_from_language(language)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

language = 'python'

    def kernelspec_from_language(language):
        """Return the python kernel that matches the current env, or the first kernel that matches the given language"""
        if language == "python":
            # Return the kernel that matches the current Python executable
            for name in find_kernel_specs():
                kernel_specs = get_kernel_spec(name)
                cmd = kernel_specs.argv[0]
                if (
                    kernel_specs.language == "python"
                    and os.path.isfile(cmd)
                    and os.path.samefile(cmd, sys.executable)
                ):
                    return {
                        "name": name,
                        "language": language,
                        "display_name": kernel_specs.display_name,
                    }
>           raise ValueError(
                "No kernel found that matches the current python executable {}\n".format(
                    sys.executable
                )
                + "Install one with 'python -m ipykernel install --name kernel_name [--user]'"
            )
E           ValueError: No kernel found that matches the current python executable /usr/bin/python3
E           Install one with 'python -m ipykernel install --name kernel_name [--user]'

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/kernels.py:46: ValueError
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
[jupytext] Reading /tmp/pytest-of-tkloczko/pytest-128/test_set_kernel_auto__home_tkl0/notebook.py in format py
___________________________ test_set_kernel_auto[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/python/python_notebook_sample.py] ___________________________

py_file = '/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/python/python_notebook_sample.py'
tmpdir = local('/tmp/pytest-of-tkloczko/pytest-128/test_set_kernel_auto__home_tkl1')

    @pytest.mark.parametrize("py_file", list_notebooks("python"))
    def test_set_kernel_auto(py_file, tmpdir):
        tmp_py = str(tmpdir.join("notebook.py"))
        tmp_ipynb = str(tmpdir.join("notebook.ipynb"))

        copyfile(py_file, tmp_py)

>       jupytext(["--to", "ipynb", tmp_py, "--set-kernel", "-"])

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_cli.py:463:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/cli.py:489: in jupytext
    exit_code += jupytext_single_file(nb_file, args, log)
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/cli.py:593: in jupytext_single_file
    kernelspec = kernelspec_from_language(language)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

language = 'python'

    def kernelspec_from_language(language):
        """Return the python kernel that matches the current env, or the first kernel that matches the given language"""
        if language == "python":
            # Return the kernel that matches the current Python executable
            for name in find_kernel_specs():
                kernel_specs = get_kernel_spec(name)
                cmd = kernel_specs.argv[0]
                if (
                    kernel_specs.language == "python"
                    and os.path.isfile(cmd)
                    and os.path.samefile(cmd, sys.executable)
                ):
                    return {
                        "name": name,
                        "language": language,
                        "display_name": kernel_specs.display_name,
                    }
>           raise ValueError(
                "No kernel found that matches the current python executable {}\n".format(
                    sys.executable
                )
                + "Install one with 'python -m ipykernel install --name kernel_name [--user]'"
            )
E           ValueError: No kernel found that matches the current python executable /usr/bin/python3
E           Install one with 'python -m ipykernel install --name kernel_name [--user]'

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/kernels.py:46: ValueError
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
[jupytext] Reading /tmp/pytest-of-tkloczko/pytest-128/test_set_kernel_auto__home_tkl1/notebook.py in format py
___________________________________________________________________ test_set_kernel_works_with_pipes_326 ___________________________________________________________________

capsys = <_pytest.capture.CaptureFixture object at 0x7f0b2f3e0e80>

    def test_set_kernel_works_with_pipes_326(capsys):
        md = u"""```python
    1 + 1
    ```"""

        with mock.patch("sys.stdin", StringIO(md)):
>           jupytext(["--to", "ipynb", "--set-kernel", "-", "-"])

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_cli.py:682:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/cli.py:489: in jupytext
    exit_code += jupytext_single_file(nb_file, args, log)
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/cli.py:593: in jupytext_single_file
    kernelspec = kernelspec_from_language(language)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

language = 'python'

    def kernelspec_from_language(language):
        """Return the python kernel that matches the current env, or the first kernel that matches the given language"""
        if language == "python":
            # Return the kernel that matches the current Python executable
            for name in find_kernel_specs():
                kernel_specs = get_kernel_spec(name)
                cmd = kernel_specs.argv[0]
                if (
                    kernel_specs.language == "python"
                    and os.path.isfile(cmd)
                    and os.path.samefile(cmd, sys.executable)
                ):
                    return {
                        "name": name,
                        "language": language,
                        "display_name": kernel_specs.display_name,
                    }
>           raise ValueError(
                "No kernel found that matches the current python executable {}\n".format(
                    sys.executable
                )
                + "Install one with 'python -m ipykernel install --name kernel_name [--user]'"
            )
E           ValueError: No kernel found that matches the current python executable /usr/bin/python3
E           Install one with 'python -m ipykernel install --name kernel_name [--user]'

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/kernels.py:46: ValueError
____________________________________________________________________________ test_utf8_out_331 _____________________________________________________________________________

capsys = <_pytest.capture.CaptureFixture object at 0x7f0b2f304c70>, caplog = <_pytest.logging.LogCaptureFixture object at 0x7f0b2f304040>

    @skip_on_windows
    @pytest.mark.filterwarnings("ignore")
    def test_utf8_out_331(capsys, caplog):
        py = u"from IPython.core.display import HTML; HTML(u'\xd7')"

        with mock.patch("sys.stdin", StringIO(py)):
>           jupytext(["--to", "ipynb", "--execute", "-"])

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_cli.py:696:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/cli.py:489: in jupytext
    exit_code += jupytext_single_file(nb_file, args, log)
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/cli.py:593: in jupytext_single_file
    kernelspec = kernelspec_from_language(language)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

language = 'python'

    def kernelspec_from_language(language):
        """Return the python kernel that matches the current env, or the first kernel that matches the given language"""
        if language == "python":
            # Return the kernel that matches the current Python executable
            for name in find_kernel_specs():
                kernel_specs = get_kernel_spec(name)
                cmd = kernel_specs.argv[0]
                if (
                    kernel_specs.language == "python"
                    and os.path.isfile(cmd)
                    and os.path.samefile(cmd, sys.executable)
                ):
                    return {
                        "name": name,
                        "language": language,
                        "display_name": kernel_specs.display_name,
                    }
>           raise ValueError(
                "No kernel found that matches the current python executable {}\n".format(
                    sys.executable
                )
                + "Install one with 'python -m ipykernel install --name kernel_name [--user]'"
            )
E           ValueError: No kernel found that matches the current python executable /usr/bin/python3
E           Install one with 'python -m ipykernel install --name kernel_name [--user]'

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/kernels.py:46: ValueError
__________________________________________________________ test_create_header_with_set_formats_and_set_kernel[md] __________________________________________________________

format_name = 'md', tmpdir = local('/tmp/pytest-of-tkloczko/pytest-128/test_create_header_with_set_fo3')
cwd_tmpdir = local('/tmp/pytest-of-tkloczko/pytest-128/test_create_header_with_set_fo3')

    @requires_myst
    @requires_pandoc
    @pytest.mark.parametrize(
        "format_name", ["md", "md:myst", "md:pandoc", "py:light", "py:percent"]
    )
    def test_create_header_with_set_formats_and_set_kernel(format_name, tmpdir, cwd_tmpdir):
        """Test jupytext --set-formats <format_name> --set-kernel - #485"""

        ext = format_name.split(":")[0]
        tmp_nb = "notebook." + ext
        tmpdir.join(tmp_nb).write("\n")

>       jupytext(["--set-formats", format_name, "--set-kernel", "-", tmp_nb])

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_cli.py:1033:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/cli.py:489: in jupytext
    exit_code += jupytext_single_file(nb_file, args, log)
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/cli.py:593: in jupytext_single_file
    kernelspec = kernelspec_from_language(language)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

language = 'python'

    def kernelspec_from_language(language):
        """Return the python kernel that matches the current env, or the first kernel that matches the given language"""
        if language == "python":
            # Return the kernel that matches the current Python executable
            for name in find_kernel_specs():
                kernel_specs = get_kernel_spec(name)
                cmd = kernel_specs.argv[0]
                if (
                    kernel_specs.language == "python"
                    and os.path.isfile(cmd)
                    and os.path.samefile(cmd, sys.executable)
                ):
                    return {
                        "name": name,
                        "language": language,
                        "display_name": kernel_specs.display_name,
                    }
>           raise ValueError(
                "No kernel found that matches the current python executable {}\n".format(
                    sys.executable
                )
                + "Install one with 'python -m ipykernel install --name kernel_name [--user]'"
            )
E           ValueError: No kernel found that matches the current python executable /usr/bin/python3
E           Install one with 'python -m ipykernel install --name kernel_name [--user]'

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/kernels.py:46: ValueError
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
[jupytext] Reading notebook.md in format md
_______________________________________________________ test_create_header_with_set_formats_and_set_kernel[md:myst] ________________________________________________________

format_name = 'md:myst', tmpdir = local('/tmp/pytest-of-tkloczko/pytest-128/test_create_header_with_set_fo4')
cwd_tmpdir = local('/tmp/pytest-of-tkloczko/pytest-128/test_create_header_with_set_fo4')

    @requires_myst
    @requires_pandoc
    @pytest.mark.parametrize(
        "format_name", ["md", "md:myst", "md:pandoc", "py:light", "py:percent"]
    )
    def test_create_header_with_set_formats_and_set_kernel(format_name, tmpdir, cwd_tmpdir):
        """Test jupytext --set-formats <format_name> --set-kernel - #485"""

        ext = format_name.split(":")[0]
        tmp_nb = "notebook." + ext
        tmpdir.join(tmp_nb).write("\n")

>       jupytext(["--set-formats", format_name, "--set-kernel", "-", tmp_nb])

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_cli.py:1033:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/cli.py:489: in jupytext
    exit_code += jupytext_single_file(nb_file, args, log)
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/cli.py:593: in jupytext_single_file
    kernelspec = kernelspec_from_language(language)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

language = 'python'

    def kernelspec_from_language(language):
        """Return the python kernel that matches the current env, or the first kernel that matches the given language"""
        if language == "python":
            # Return the kernel that matches the current Python executable
            for name in find_kernel_specs():
                kernel_specs = get_kernel_spec(name)
                cmd = kernel_specs.argv[0]
                if (
                    kernel_specs.language == "python"
                    and os.path.isfile(cmd)
                    and os.path.samefile(cmd, sys.executable)
                ):
                    return {
                        "name": name,
                        "language": language,
                        "display_name": kernel_specs.display_name,
                    }
>           raise ValueError(
                "No kernel found that matches the current python executable {}\n".format(
                    sys.executable
                )
                + "Install one with 'python -m ipykernel install --name kernel_name [--user]'"
            )
E           ValueError: No kernel found that matches the current python executable /usr/bin/python3
E           Install one with 'python -m ipykernel install --name kernel_name [--user]'

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/kernels.py:46: ValueError
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
[jupytext] Reading notebook.md in format md
______________________________________________________ test_create_header_with_set_formats_and_set_kernel[md:pandoc] _______________________________________________________

format_name = 'md:pandoc', tmpdir = local('/tmp/pytest-of-tkloczko/pytest-128/test_create_header_with_set_fo5')
cwd_tmpdir = local('/tmp/pytest-of-tkloczko/pytest-128/test_create_header_with_set_fo5')

    @requires_myst
    @requires_pandoc
    @pytest.mark.parametrize(
        "format_name", ["md", "md:myst", "md:pandoc", "py:light", "py:percent"]
    )
    def test_create_header_with_set_formats_and_set_kernel(format_name, tmpdir, cwd_tmpdir):
        """Test jupytext --set-formats <format_name> --set-kernel - #485"""

        ext = format_name.split(":")[0]
        tmp_nb = "notebook." + ext
        tmpdir.join(tmp_nb).write("\n")

>       jupytext(["--set-formats", format_name, "--set-kernel", "-", tmp_nb])

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_cli.py:1033:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/cli.py:489: in jupytext
    exit_code += jupytext_single_file(nb_file, args, log)
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/cli.py:593: in jupytext_single_file
    kernelspec = kernelspec_from_language(language)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

language = 'python'

    def kernelspec_from_language(language):
        """Return the python kernel that matches the current env, or the first kernel that matches the given language"""
        if language == "python":
            # Return the kernel that matches the current Python executable
            for name in find_kernel_specs():
                kernel_specs = get_kernel_spec(name)
                cmd = kernel_specs.argv[0]
                if (
                    kernel_specs.language == "python"
                    and os.path.isfile(cmd)
                    and os.path.samefile(cmd, sys.executable)
                ):
                    return {
                        "name": name,
                        "language": language,
                        "display_name": kernel_specs.display_name,
                    }
>           raise ValueError(
                "No kernel found that matches the current python executable {}\n".format(
                    sys.executable
                )
                + "Install one with 'python -m ipykernel install --name kernel_name [--user]'"
            )
E           ValueError: No kernel found that matches the current python executable /usr/bin/python3
E           Install one with 'python -m ipykernel install --name kernel_name [--user]'

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/kernels.py:46: ValueError
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
[jupytext] Reading notebook.md in format md
_______________________________________________________ test_create_header_with_set_formats_and_set_kernel[py:light] _______________________________________________________

format_name = 'py:light', tmpdir = local('/tmp/pytest-of-tkloczko/pytest-128/test_create_header_with_set_fo6')
cwd_tmpdir = local('/tmp/pytest-of-tkloczko/pytest-128/test_create_header_with_set_fo6')

    @requires_myst
    @requires_pandoc
    @pytest.mark.parametrize(
        "format_name", ["md", "md:myst", "md:pandoc", "py:light", "py:percent"]
    )
    def test_create_header_with_set_formats_and_set_kernel(format_name, tmpdir, cwd_tmpdir):
        """Test jupytext --set-formats <format_name> --set-kernel - #485"""

        ext = format_name.split(":")[0]
        tmp_nb = "notebook." + ext
        tmpdir.join(tmp_nb).write("\n")

>       jupytext(["--set-formats", format_name, "--set-kernel", "-", tmp_nb])

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_cli.py:1033:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/cli.py:489: in jupytext
    exit_code += jupytext_single_file(nb_file, args, log)
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/cli.py:593: in jupytext_single_file
    kernelspec = kernelspec_from_language(language)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

language = 'python'

    def kernelspec_from_language(language):
        """Return the python kernel that matches the current env, or the first kernel that matches the given language"""
        if language == "python":
            # Return the kernel that matches the current Python executable
            for name in find_kernel_specs():
                kernel_specs = get_kernel_spec(name)
                cmd = kernel_specs.argv[0]
                if (
                    kernel_specs.language == "python"
                    and os.path.isfile(cmd)
                    and os.path.samefile(cmd, sys.executable)
                ):
                    return {
                        "name": name,
                        "language": language,
                        "display_name": kernel_specs.display_name,
                    }
>           raise ValueError(
                "No kernel found that matches the current python executable {}\n".format(
                    sys.executable
                )
                + "Install one with 'python -m ipykernel install --name kernel_name [--user]'"
            )
E           ValueError: No kernel found that matches the current python executable /usr/bin/python3
E           Install one with 'python -m ipykernel install --name kernel_name [--user]'

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/kernels.py:46: ValueError
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
[jupytext] Reading notebook.py in format py
______________________________________________________ test_create_header_with_set_formats_and_set_kernel[py:percent] ______________________________________________________

format_name = 'py:percent', tmpdir = local('/tmp/pytest-of-tkloczko/pytest-128/test_create_header_with_set_fo7')
cwd_tmpdir = local('/tmp/pytest-of-tkloczko/pytest-128/test_create_header_with_set_fo7')

    @requires_myst
    @requires_pandoc
    @pytest.mark.parametrize(
        "format_name", ["md", "md:myst", "md:pandoc", "py:light", "py:percent"]
    )
    def test_create_header_with_set_formats_and_set_kernel(format_name, tmpdir, cwd_tmpdir):
        """Test jupytext --set-formats <format_name> --set-kernel - #485"""

        ext = format_name.split(":")[0]
        tmp_nb = "notebook." + ext
        tmpdir.join(tmp_nb).write("\n")

>       jupytext(["--set-formats", format_name, "--set-kernel", "-", tmp_nb])

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_cli.py:1033:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/cli.py:489: in jupytext
    exit_code += jupytext_single_file(nb_file, args, log)
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/cli.py:593: in jupytext_single_file
    kernelspec = kernelspec_from_language(language)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

language = 'python'

    def kernelspec_from_language(language):
        """Return the python kernel that matches the current env, or the first kernel that matches the given language"""
        if language == "python":
            # Return the kernel that matches the current Python executable
            for name in find_kernel_specs():
                kernel_specs = get_kernel_spec(name)
                cmd = kernel_specs.argv[0]
                if (
                    kernel_specs.language == "python"
                    and os.path.isfile(cmd)
                    and os.path.samefile(cmd, sys.executable)
                ):
                    return {
                        "name": name,
                        "language": language,
                        "display_name": kernel_specs.display_name,
                    }
>           raise ValueError(
                "No kernel found that matches the current python executable {}\n".format(
                    sys.executable
                )
                + "Install one with 'python -m ipykernel install --name kernel_name [--user]'"
            )
E           ValueError: No kernel found that matches the current python executable /usr/bin/python3
E           Install one with 'python -m ipykernel install --name kernel_name [--user]'

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/kernels.py:46: ValueError
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
[jupytext] Reading notebook.py in format py
_________________________ test_python_kernel_preserves_R_files[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/R/simple_r_script.R] __________________________

nb_file = '/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/R/simple_r_script.R'
tmpdir = local('/tmp/pytest-of-tkloczko/pytest-128/test_python_kernel_preserves_R0')

    @pytest.mark.parametrize("nb_file", list_notebooks("R"))
    def test_python_kernel_preserves_R_files(nb_file, tmpdir):
        """Opening a R file with a Jupyter server that has no R kernel should not modify the file"""
        tmp_r_file = str(tmpdir.join("script.R"))
        with open(nb_file) as fp:
            script = fp.read()
        with open(tmp_r_file, "w") as fp:
            fp.write(script)

        # create contents manager
        cm = jupytext.TextFileContentsManager()
        cm.root_dir = str(tmpdir)

        # open notebook, set Python kernel and save
        model = cm.get("script.R")
>       model["content"].metadata["kernelspec"] = kernelspec_from_language("python")

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_contentsmanager.py:1235:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

language = 'python'

    def kernelspec_from_language(language):
        """Return the python kernel that matches the current env, or the first kernel that matches the given language"""
        if language == "python":
            # Return the kernel that matches the current Python executable
            for name in find_kernel_specs():
                kernel_specs = get_kernel_spec(name)
                cmd = kernel_specs.argv[0]
                if (
                    kernel_specs.language == "python"
                    and os.path.isfile(cmd)
                    and os.path.samefile(cmd, sys.executable)
                ):
                    return {
                        "name": name,
                        "language": language,
                        "display_name": kernel_specs.display_name,
                    }
>           raise ValueError(
                "No kernel found that matches the current python executable {}\n".format(
                    sys.executable
                )
                + "Install one with 'python -m ipykernel install --name kernel_name [--user]'"
            )
E           ValueError: No kernel found that matches the current python executable /usr/bin/python3
E           Install one with 'python -m ipykernel install --name kernel_name [--user]'

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/kernels.py:46: ValueError
_______________________________________________________________________________ test_execute _______________________________________________________________________________

tmpdir = local('/tmp/pytest-of-tkloczko/pytest-128/test_execute0'), caplog = <_pytest.logging.LogCaptureFixture object at 0x7f0b2e01d190>
capsys = <_pytest.capture.CaptureFixture object at 0x7f0b2e01dee0>

    @requires_nbconvert
    @skip_on_windows
    def test_execute(tmpdir, caplog, capsys):
        tmp_ipynb = str(tmpdir.join("notebook.ipynb"))
        tmp_py = str(tmpdir.join("notebook.py"))

        with open(tmp_py, "w") as fp:
            fp.write(
                """1 + 2
    """
            )

>       jupytext(args=[tmp_py, "--to", "ipynb", "--execute"])

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_execute.py:82:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/cli.py:489: in jupytext
    exit_code += jupytext_single_file(nb_file, args, log)
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/cli.py:593: in jupytext_single_file
    kernelspec = kernelspec_from_language(language)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

language = 'python'

    def kernelspec_from_language(language):
        """Return the python kernel that matches the current env, or the first kernel that matches the given language"""
        if language == "python":
            # Return the kernel that matches the current Python executable
            for name in find_kernel_specs():
                kernel_specs = get_kernel_spec(name)
                cmd = kernel_specs.argv[0]
                if (
                    kernel_specs.language == "python"
                    and os.path.isfile(cmd)
                    and os.path.samefile(cmd, sys.executable)
                ):
                    return {
                        "name": name,
                        "language": language,
                        "display_name": kernel_specs.display_name,
                    }
>           raise ValueError(
                "No kernel found that matches the current python executable {}\n".format(
                    sys.executable
                )
                + "Install one with 'python -m ipykernel install --name kernel_name [--user]'"
            )
E           ValueError: No kernel found that matches the current python executable /usr/bin/python3
E           Install one with 'python -m ipykernel install --name kernel_name [--user]'

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/kernels.py:46: ValueError
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
[jupytext] Reading /tmp/pytest-of-tkloczko/pytest-128/test_execute0/notebook.py in format py
__________________________________________________________________________ test_execute_readme_ok __________________________________________________________________________

tmpdir = local('/tmp/pytest-of-tkloczko/pytest-128/test_execute_readme_ok0')

    @requires_nbconvert
    def test_execute_readme_ok(tmpdir):
        tmp_md = str(tmpdir.join("notebook.md"))

        with open(tmp_md, "w") as fp:
            fp.write(
                """
    A readme with correct instructions

    ```python
    1 + 2
    ```
    """
            )

>       jupytext(args=[tmp_md, "--execute"])

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_execute.py:104:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/cli.py:489: in jupytext
    exit_code += jupytext_single_file(nb_file, args, log)
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/cli.py:593: in jupytext_single_file
    kernelspec = kernelspec_from_language(language)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

language = 'python'

    def kernelspec_from_language(language):
        """Return the python kernel that matches the current env, or the first kernel that matches the given language"""
        if language == "python":
            # Return the kernel that matches the current Python executable
            for name in find_kernel_specs():
                kernel_specs = get_kernel_spec(name)
                cmd = kernel_specs.argv[0]
                if (
                    kernel_specs.language == "python"
                    and os.path.isfile(cmd)
                    and os.path.samefile(cmd, sys.executable)
                ):
                    return {
                        "name": name,
                        "language": language,
                        "display_name": kernel_specs.display_name,
                    }
>           raise ValueError(
                "No kernel found that matches the current python executable {}\n".format(
                    sys.executable
                )
                + "Install one with 'python -m ipykernel install --name kernel_name [--user]'"
            )
E           ValueError: No kernel found that matches the current python executable /usr/bin/python3
E           Install one with 'python -m ipykernel install --name kernel_name [--user]'

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/kernels.py:46: ValueError
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
[jupytext] Reading /tmp/pytest-of-tkloczko/pytest-128/test_execute_readme_ok0/notebook.md in format md
________________________________________________________________________ test_execute_readme_not_ok ________________________________________________________________________

tmpdir = local('/tmp/pytest-of-tkloczko/pytest-128/test_execute_readme_not_ok0')

    @requires_nbconvert
    @skip_on_windows
    def test_execute_readme_not_ok(tmpdir):
        tmp_md = str(tmpdir.join("notebook.md"))

        with open(tmp_md, "w") as fp:
            fp.write(
                """
    A readme with incorrect instructions (a is not defined)

    ```python
    a + 1
    ```
    """
            )

        import nbconvert

        with pytest.raises(
            nbconvert.preprocessors.execute.CellExecutionError, match="is not defined"
        ):
>           jupytext(args=[tmp_md, "--execute"])

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_execute.py:128:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/cli.py:489: in jupytext
    exit_code += jupytext_single_file(nb_file, args, log)
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/cli.py:593: in jupytext_single_file
    kernelspec = kernelspec_from_language(language)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

language = 'python'

    def kernelspec_from_language(language):
        """Return the python kernel that matches the current env, or the first kernel that matches the given language"""
        if language == "python":
            # Return the kernel that matches the current Python executable
            for name in find_kernel_specs():
                kernel_specs = get_kernel_spec(name)
                cmd = kernel_specs.argv[0]
                if (
                    kernel_specs.language == "python"
                    and os.path.isfile(cmd)
                    and os.path.samefile(cmd, sys.executable)
                ):
                    return {
                        "name": name,
                        "language": language,
                        "display_name": kernel_specs.display_name,
                    }
>           raise ValueError(
                "No kernel found that matches the current python executable {}\n".format(
                    sys.executable
                )
                + "Install one with 'python -m ipykernel install --name kernel_name [--user]'"
            )
E           ValueError: No kernel found that matches the current python executable /usr/bin/python3
E           Install one with 'python -m ipykernel install --name kernel_name [--user]'

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/kernels.py:46: ValueError
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
[jupytext] Reading /tmp/pytest-of-tkloczko/pytest-128/test_execute_readme_not_ok0/notebook.md in format md
____________________________________________________________________________ test_execute_sync _____________________________________________________________________________

tmpdir = local('/tmp/pytest-of-tkloczko/pytest-128/test_execute_sync0'), caplog = <_pytest.logging.LogCaptureFixture object at 0x7f0b2f72f280>
capsys = <_pytest.capture.CaptureFixture object at 0x7f0b2f72fa90>

    @requires_nbconvert
    @skip_on_windows
    def test_execute_sync(tmpdir, caplog, capsys):
        tmp_ipynb = str(tmpdir.join("notebook.ipynb"))
        tmp_py = str(tmpdir.join("notebook.py"))

        with open(tmp_py, "w") as fp:
            fp.write(
                """1 + 2
    """
            )

>       jupytext(args=[tmp_py, "--set-formats", "py,ipynb", "--sync", "--execute"])

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_execute.py:143:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/cli.py:489: in jupytext
    exit_code += jupytext_single_file(nb_file, args, log)
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/cli.py:593: in jupytext_single_file
    kernelspec = kernelspec_from_language(language)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

language = 'python'

    def kernelspec_from_language(language):
        """Return the python kernel that matches the current env, or the first kernel that matches the given language"""
        if language == "python":
            # Return the kernel that matches the current Python executable
            for name in find_kernel_specs():
                kernel_specs = get_kernel_spec(name)
                cmd = kernel_specs.argv[0]
                if (
                    kernel_specs.language == "python"
                    and os.path.isfile(cmd)
                    and os.path.samefile(cmd, sys.executable)
                ):
                    return {
                        "name": name,
                        "language": language,
                        "display_name": kernel_specs.display_name,
                    }
>           raise ValueError(
                "No kernel found that matches the current python executable {}\n".format(
                    sys.executable
                )
                + "Install one with 'python -m ipykernel install --name kernel_name [--user]'"
            )
E           ValueError: No kernel found that matches the current python executable /usr/bin/python3
E           Install one with 'python -m ipykernel install --name kernel_name [--user]'

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/kernels.py:46: ValueError
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
[jupytext] Reading /tmp/pytest-of-tkloczko/pytest-128/test_execute_sync0/notebook.py in format py
________________________________________________________________________ test_execute_in_subfolder _________________________________________________________________________

tmpdir = local('/tmp/pytest-of-tkloczko/pytest-128/test_execute_in_subfolder0'), caplog = <_pytest.logging.LogCaptureFixture object at 0x7f0b2dd9cd00>
capsys = <_pytest.capture.CaptureFixture object at 0x7f0b2dd9cee0>

    @requires_nbconvert
    @skip_on_windows
    def test_execute_in_subfolder(tmpdir, caplog, capsys):
        subfolder = tmpdir.mkdir("subfolder")

        tmp_csv = str(subfolder.join("inputs.csv"))
        tmp_py = str(subfolder.join("notebook.py"))
        tmp_ipynb = str(subfolder.join("notebook.ipynb"))

        with open(tmp_csv, "w") as fp:
            fp.write("1\n2\n")

        with open(tmp_py, "w") as fp:
            fp.write(
                """import ast

    with open('inputs.csv') as fp:
        text = fp.read()

    sum(ast.literal_eval(line) for line in text.splitlines())
    """
            )

>       jupytext(args=[tmp_py, "--to", "ipynb", "--execute"])

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_execute.py:195:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/cli.py:489: in jupytext
    exit_code += jupytext_single_file(nb_file, args, log)
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/cli.py:593: in jupytext_single_file
    kernelspec = kernelspec_from_language(language)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

language = 'python'

    def kernelspec_from_language(language):
        """Return the python kernel that matches the current env, or the first kernel that matches the given language"""
        if language == "python":
            # Return the kernel that matches the current Python executable
            for name in find_kernel_specs():
                kernel_specs = get_kernel_spec(name)
                cmd = kernel_specs.argv[0]
                if (
                    kernel_specs.language == "python"
                    and os.path.isfile(cmd)
                    and os.path.samefile(cmd, sys.executable)
                ):
                    return {
                        "name": name,
                        "language": language,
                        "display_name": kernel_specs.display_name,
                    }
>           raise ValueError(
                "No kernel found that matches the current python executable {}\n".format(
                    sys.executable
                )
                + "Install one with 'python -m ipykernel install --name kernel_name [--user]'"
            )
E           ValueError: No kernel found that matches the current python executable /usr/bin/python3
E           Install one with 'python -m ipykernel install --name kernel_name [--user]'

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/kernels.py:46: ValueError
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
[jupytext] Reading /tmp/pytest-of-tkloczko/pytest-128/test_execute_in_subfolder0/subfolder/notebook.py in format py
__________________ test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_julia/julia_benchmark_plotly_barchart.ipynb] ___________________

nb_file = '/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_julia/julia_benchmark_plotly_barchart.ipynb', no_jupytext_version_number = None

    @requires_pandoc
    @pytest.mark.parametrize(
        "nb_file",
        list_notebooks("ipynb", skip="(functional|Notebook with|flavors|invalid|305)"),
    )
    def test_ipynb_to_pandoc(nb_file, no_jupytext_version_number):
>       assert_conversion_same_as_mirror(nb_file, "md:pandoc", "ipynb_to_pandoc")

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_mirror.py:138:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_mirror.py:80: in assert_conversion_same_as_mirror
    compare(actual, expected)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

actual = '---\njupyter:\n  kernelspec:\n    display_name: Julia 1.1.1\n    language: julia\n    name: julia-1.1\n  nbformat: 4\...\n            response["url"],\n            "/700/700\' width=\'750\'></iframe>")\ndisplay("text/html", s)\n```\n:::\n'
expected = '---\njupyter:\n  kernelspec:\n    display_name: Julia 1.1.1\n    language: julia\n    name: julia-1.1\n  nbformat: 4\...\n            response["url"],\n            "/700/700\' width=\'750\'></iframe>")\ndisplay("text/html", s)\n```\n:::\n'
actual_name = 'actual', expected_name = 'expected', return_diff = False

    def compare(
        actual, expected, actual_name="actual", expected_name="expected", return_diff=False
    ):
        """Compare two strings, lists or dict-like objects"""
        if actual != expected:
            diff = difflib.unified_diff(
                _multilines(expected),
                _multilines(actual),
                expected_name,
                actual_name,
                lineterm="",
            )
            if expected_name == "" and actual_name == "":
                diff = list(diff)[2:]
            diff = "\n".join(diff)
            if return_diff:
                return diff
>           raise AssertionError("\n" + diff)
E           AssertionError:
E           --- expected
E           +++ actual
E           @@ -9,7 +9,7 @@
E            ---
E
E            ::: {.cell .code}
E           -``` {.julia}
E           +``` julia
E            # IJulia rocks! So does Plotly. Check it out
E
E            using Plotly
E           @@ -21,7 +21,7 @@
E            :::
E
E            ::: {.cell .code}
E           -``` {.julia}
E           +``` julia
E            # Following data taken from http://julialang.org/ frontpage
E            benchmarks = ["fib", "parse_int", "quicksort3", "mandel", "pi_sum", "rand_mat_stat", "rand_mat_mul"]
E            platforms = ["Fortran", "Julia", "Python", "R", "Matlab", "Mathematica", "Javascript", "Go"]
E           @@ -70,7 +70,7 @@
E            :::
E
E            ::: {.cell .code}
E           -``` {.julia}
E           +``` julia
E            # checkout https://plot.ly/api/ for more Julia examples!
E            # But to show off some other Plotly features:
E            x = 1:1500

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/compare.py:47: AssertionError
--------------------------------------------------------------------------- Captured stderr call ---------------------------------------------------------------------------
[WARNING] Deprecated: --atx-headers. Use --markdown-headings=atx instead.
_________________________ test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/Notebook_with_R_magic.ipynb] _________________________

nb_file = '/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/Notebook_with_R_magic.ipynb', no_jupytext_version_number = None

    @requires_pandoc
    @pytest.mark.parametrize(
        "nb_file",
        list_notebooks("ipynb", skip="(functional|Notebook with|flavors|invalid|305)"),
    )
    def test_ipynb_to_pandoc(nb_file, no_jupytext_version_number):
>       assert_conversion_same_as_mirror(nb_file, "md:pandoc", "ipynb_to_pandoc")

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_mirror.py:138:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_mirror.py:80: in assert_conversion_same_as_mirror
    compare(actual, expected)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

actual = '---\njupyter:\n  kernelspec:\n    display_name: Python 2\n    language: python\n    name: python2\n  nbformat: 4\n  n...on\n%%R -w 400 -h 240\nggplot(iris, aes(x = Sepal.Length, y = Petal.Length, color=Species)) + geom_point()\n```\n:::\n'
expected = '---\njupyter:\n  kernelspec:\n    display_name: Python 2\n    language: python\n    name: python2\n  nbformat: 4\n  n...n}\n%%R -w 400 -h 240\nggplot(iris, aes(x = Sepal.Length, y = Petal.Length, color=Species)) + geom_point()\n```\n:::\n'
actual_name = 'actual', expected_name = 'expected', return_diff = False

    def compare(
        actual, expected, actual_name="actual", expected_name="expected", return_diff=False
    ):
        """Compare two strings, lists or dict-like objects"""
        if actual != expected:
            diff = difflib.unified_diff(
                _multilines(expected),
                _multilines(actual),
                expected_name,
                actual_name,
                lineterm="",
            )
            if expected_name == "" and actual_name == "":
                diff = list(diff)[2:]
            diff = "\n".join(diff)
            if return_diff:
                return diff
>           raise AssertionError("\n" + diff)
E           AssertionError:
E           --- expected
E           +++ actual
E           @@ -15,20 +15,20 @@
E            :::
E
E            ::: {.cell .code}
E           -``` {.python}
E           +``` python
E            %load_ext rpy2.ipython
E            ```
E            :::
E
E            ::: {.cell .code}
E           -``` {.python}
E           +``` python
E            %%R
E            suppressMessages(require(tidyverse))
E            ```
E            :::
E
E            ::: {.cell .code}
E           -``` {.python}
E           +``` python
E            %%R
E            ggplot(iris, aes(x = Sepal.Length, y = Petal.Length, color=Species)) + geom_point()
E            ```
E           @@ -39,7 +39,7 @@
E            :::
E
E            ::: {.cell .code}
E           -``` {.python}
E           +``` python
E            %%R -w 400 -h 240
E            ggplot(iris, aes(x = Sepal.Length, y = Petal.Length, color=Species)) + geom_point()
E            ```

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/compare.py:47: AssertionError
--------------------------------------------------------------------------- Captured stderr call ---------------------------------------------------------------------------
[WARNING] Deprecated: --atx-headers. Use --markdown-headings=atx instead.
____________________ test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/Notebook_with_more_R_magic_111.ipynb] _____________________

nb_file = '/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/Notebook_with_more_R_magic_111.ipynb', no_jupytext_version_number = None

    @requires_pandoc
    @pytest.mark.parametrize(
        "nb_file",
        list_notebooks("ipynb", skip="(functional|Notebook with|flavors|invalid|305)"),
    )
    def test_ipynb_to_pandoc(nb_file, no_jupytext_version_number):
>       assert_conversion_same_as_mirror(nb_file, "md:pandoc", "ipynb_to_pandoc")

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_mirror.py:138:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_mirror.py:80: in assert_conversion_same_as_mirror
    compare(actual, expected)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

actual = '---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  nbformat: 4\n  n...%%R -i df\nlibrary("ggplot2")\nggplot(data = df) + geom_point(aes(x = X, y = Y, color = Letter, size = Z))\n```\n:::\n'
expected = '---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  nbformat: 4\n  n...%%R -i df\nlibrary("ggplot2")\nggplot(data = df) + geom_point(aes(x = X, y = Y, color = Letter, size = Z))\n```\n:::\n'
actual_name = 'actual', expected_name = 'expected', return_diff = False

    def compare(
        actual, expected, actual_name="actual", expected_name="expected", return_diff=False
    ):
        """Compare two strings, lists or dict-like objects"""
        if actual != expected:
            diff = difflib.unified_diff(
                _multilines(expected),
                _multilines(actual),
                expected_name,
                actual_name,
                lineterm="",
            )
            if expected_name == "" and actual_name == "":
                diff = list(diff)[2:]
            diff = "\n".join(diff)
            if return_diff:
                return diff
>           raise AssertionError("\n" + diff)
E           AssertionError:
E           --- expected
E           +++ actual
E           @@ -9,7 +9,7 @@
E            ---
E
E            ::: {.cell .code}
E           -``` {.python}
E           +``` python
E            %load_ext rpy2.ipython
E            import pandas as pd
E
E           @@ -25,7 +25,7 @@
E            :::
E
E            ::: {.cell .code}
E           -``` {.python}
E           +``` python
E            %%R -i df
E            library("ggplot2")
E            ggplot(data = df) + geom_point(aes(x = X, y = Y, color = Letter, size = Z))

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/compare.py:47: AssertionError
--------------------------------------------------------------------------- Captured stderr call ---------------------------------------------------------------------------
[WARNING] Deprecated: --atx-headers. Use --markdown-headings=atx instead.
___________________________ test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/World population.ipynb] ____________________________

nb_file = '/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/World population.ipynb', no_jupytext_version_number = None

    @requires_pandoc
    @pytest.mark.parametrize(
        "nb_file",
        list_notebooks("ipynb", skip="(functional|Notebook with|flavors|invalid|305)"),
    )
    def test_ipynb_to_pandoc(nb_file, no_jupytext_version_number):
>       assert_conversion_same_as_mirror(nb_file, "md:pandoc", "ipynb_to_pandoc")

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_mirror.py:138:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_mirror.py:80: in assert_conversion_same_as_mirror
    compare(actual, expected)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

actual = "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  nbformat: 4\n  n...o.Layout(title='World population',\n                                 barmode='stack'))\noffline.iplot(fig)\n```\n:::\n"
expected = "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  nbformat: 4\n  n...o.Layout(title='World population',\n                                 barmode='stack'))\noffline.iplot(fig)\n```\n:::\n"
actual_name = 'actual', expected_name = 'expected', return_diff = False

    def compare(
        actual, expected, actual_name="actual", expected_name="expected", return_diff=False
    ):
        """Compare two strings, lists or dict-like objects"""
        if actual != expected:
            diff = difflib.unified_diff(
                _multilines(expected),
                _multilines(actual),
                expected_name,
                actual_name,
                lineterm="",
            )
            if expected_name == "" and actual_name == "":
                diff = list(diff)[2:]
            diff = "\n".join(diff)
            if return_diff:
                return diff
>           raise AssertionError("\n" + diff)
E           AssertionError:
E           --- expected
E           +++ actual
E           @@ -19,7 +19,7 @@
E            :::
E
E            ::: {.cell .code}
E           -``` {.python}
E           +``` python
E            import pandas as pd
E            import wbdata as wb
E
E           @@ -34,7 +34,7 @@
E            :::
E
E            ::: {.cell .code}
E           -``` {.python}
E           +``` python
E            wb.search_indicators('Population, total')  # SP.POP.TOTL
E            # wb.search_indicators('area')
E            # => https://data.worldbank.org/indicator is easier to use
E           @@ -46,7 +46,7 @@
E            :::
E
E            ::: {.cell .code}
E           -``` {.python}
E           +``` python
E            indicators = {'SP.POP.TOTL': 'Population, total',
E                          'AG.SRF.TOTL.K2': 'Surface area (sq. km)',
E                          'AG.LND.TOTL.K2': 'Land area (sq. km)',
E           @@ -61,7 +61,7 @@
E            :::
E
E            ::: {.cell .code}
E           -``` {.python}
E           +``` python
E            data.loc['World']
E            ```
E            :::
E           @@ -71,7 +71,7 @@
E            :::
E
E            ::: {.cell .code}
E           -``` {.python}
E           +``` python
E            data.loc[(slice(None), '2017-01-01'), :]['Population, total'].dropna(
E            ).sort_values().tail(60).index.get_level_values('country')
E            ```
E           @@ -82,7 +82,7 @@
E            :::
E
E            ::: {.cell .code}
E           -``` {.python}
E           +``` python
E            zones = ['North America', 'Middle East & North Africa',
E                     'Latin America & Caribbean', 'Europe & Central Asia',
E                     'Sub-Saharan Africa', 'South Asia',
E           @@ -95,7 +95,7 @@
E            :::
E
E            ::: {.cell .code}
E           -``` {.python}
E           +``` python
E            population = data.loc[zones]['Population, total'].swaplevel().unstack()
E            population = population[zones]
E            assert all(data.loc['World']['Population, total'] == population.sum(axis=1))
E           @@ -107,13 +107,13 @@
E            :::
E
E            ::: {.cell .code}
E           -``` {.python}
E           +``` python
E            import matplotlib.pyplot as plt
E            ```
E            :::
E
E            ::: {.cell .code}
E           -``` {.python}
E           +``` python
E            plt.clf()
E            plt.figure(figsize=(10, 5), dpi=100)
E            plt.stackplot(population.index, population.values.T / 1e9)
E           @@ -135,7 +135,7 @@
E            :::
E
E            ::: {.cell .code}
E           -``` {.python}
E           +``` python
E            import plotly.offline as offline
E            import plotly.graph_objs as go
E
E           @@ -144,7 +144,7 @@
E            :::
E
E            ::: {.cell .code}
E           -``` {.python}
E           +``` python
E            bars = [go.Bar(x=population.index, y=population[zone], name=zone)
E                    for zone in zones]
E            fig = go.Figure(data=bars,

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/compare.py:47: AssertionError
--------------------------------------------------------------------------- Captured stderr call ---------------------------------------------------------------------------
[WARNING] Deprecated: --atx-headers. Use --markdown-headings=atx instead.
_____________________________ test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/cat_variable.ipynb] ______________________________

nb_file = '/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/cat_variable.ipynb', no_jupytext_version_number = None

    @requires_pandoc
    @pytest.mark.parametrize(
        "nb_file",
        list_notebooks("ipynb", skip="(functional|Notebook with|flavors|invalid|305)"),
    )
    def test_ipynb_to_pandoc(nb_file, no_jupytext_version_number):
>       assert_conversion_same_as_mirror(nb_file, "md:pandoc", "ipynb_to_pandoc")

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_mirror.py:138:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_mirror.py:80: in assert_conversion_same_as_mirror
    compare(actual, expected)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

actual = '---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  nbformat: 4\n  nbformat_minor: 2\n---\n\n::: {.cell .code}\n``` python\ncat = 42\n```\n:::\n'
expected = '---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  nbformat: 4\n  nbformat_minor: 2\n---\n\n::: {.cell .code}\n``` {.python}\ncat = 42\n```\n:::\n'
actual_name = 'actual', expected_name = 'expected', return_diff = False

    def compare(
        actual, expected, actual_name="actual", expected_name="expected", return_diff=False
    ):
        """Compare two strings, lists or dict-like objects"""
        if actual != expected:
            diff = difflib.unified_diff(
                _multilines(expected),
                _multilines(actual),
                expected_name,
                actual_name,
                lineterm="",
            )
            if expected_name == "" and actual_name == "":
                diff = list(diff)[2:]
            diff = "\n".join(diff)
            if return_diff:
                return diff
>           raise AssertionError("\n" + diff)
E           AssertionError:
E           --- expected
E           +++ actual
E           @@ -9,7 +9,7 @@
E            ---
E
E            ::: {.cell .code}
E           -``` {.python}
E           +``` python
E            cat = 42
E            ```
E            :::

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/compare.py:47: AssertionError
--------------------------------------------------------------------------- Captured stderr call ---------------------------------------------------------------------------
[WARNING] Deprecated: --atx-headers. Use --markdown-headings=atx instead.
_________________ test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/convert_to_py_then_test_with_update83.ipynb] _________________

nb_file = '/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/convert_to_py_then_test_with_update83.ipynb', no_jupytext_version_number = None

    @requires_pandoc
    @pytest.mark.parametrize(
        "nb_file",
        list_notebooks("ipynb", skip="(functional|Notebook with|flavors|invalid|305)"),
    )
    def test_ipynb_to_pandoc(nb_file, no_jupytext_version_number):
>       assert_conversion_same_as_mirror(nb_file, "md:pandoc", "ipynb_to_pandoc")

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_mirror.py:138:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_mirror.py:80: in assert_conversion_same_as_mirror
    compare(actual, expected)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

actual = "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  nbformat: 4\n  n...int('asdf')\n```\n:::\n\n::: {.cell .markdown}\nThanks for jupytext!\n:::\n\n::: {.cell .code}\n``` python\n```\n:::\n"
expected = "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  nbformat: 4\n  n...('asdf')\n```\n:::\n\n::: {.cell .markdown}\nThanks for jupytext!\n:::\n\n::: {.cell .code}\n``` {.python}\n```\n:::\n"
actual_name = 'actual', expected_name = 'expected', return_diff = False

    def compare(
        actual, expected, actual_name="actual", expected_name="expected", return_diff=False
    ):
        """Compare two strings, lists or dict-like objects"""
        if actual != expected:
            diff = difflib.unified_diff(
                _multilines(expected),
                _multilines(actual),
                expected_name,
                actual_name,
                lineterm="",
            )
            if expected_name == "" and actual_name == "":
                diff = list(diff)[2:]
            diff = "\n".join(diff)
            if return_diff:
                return diff
>           raise AssertionError("\n" + diff)
E           AssertionError:
E           --- expected
E           +++ actual
E           @@ -9,7 +9,7 @@
E            ---
E
E            ::: {.cell .code}
E           -``` {.python}
E           +``` python
E            %%time
E
E            print('asdf')
E           @@ -21,7 +21,7 @@
E            :::
E
E            ::: {.cell .code}
E           -``` {.python}
E           +``` python
E            ```
E            :::

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/compare.py:47: AssertionError
--------------------------------------------------------------------------- Captured stderr call ---------------------------------------------------------------------------
[WARNING] Deprecated: --atx-headers. Use --markdown-headings=atx instead.
______________________________ test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/frozen_cell.ipynb] ______________________________

nb_file = '/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/frozen_cell.ipynb', no_jupytext_version_number = None

    @requires_pandoc
    @pytest.mark.parametrize(
        "nb_file",
        list_notebooks("ipynb", skip="(functional|Notebook with|flavors|invalid|305)"),
    )
    def test_ipynb_to_pandoc(nb_file, no_jupytext_version_number):
>       assert_conversion_same_as_mirror(nb_file, "md:pandoc", "ipynb_to_pandoc")

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_mirror.py:138:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_mirror.py:80: in assert_conversion_same_as_mirror
    compare(actual, expected)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

actual = '---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  nbformat: 4\n  n...l="{\\"frozen\\":true}"}\n``` python\n# This is an frozen cell\nprint("I\'m frozen so Im not executed :(")\n```\n:::\n'
expected = '---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  nbformat: 4\n  n...{\\"frozen\\":true}"}\n``` {.python}\n# This is an frozen cell\nprint("I\'m frozen so Im not executed :(")\n```\n:::\n'
actual_name = 'actual', expected_name = 'expected', return_diff = False

    def compare(
        actual, expected, actual_name="actual", expected_name="expected", return_diff=False
    ):
        """Compare two strings, lists or dict-like objects"""
        if actual != expected:
            diff = difflib.unified_diff(
                _multilines(expected),
                _multilines(actual),
                expected_name,
                actual_name,
                lineterm="",
            )
            if expected_name == "" and actual_name == "":
                diff = list(diff)[2:]
            diff = "\n".join(diff)
            if return_diff:
                return diff
>           raise AssertionError("\n" + diff)
E           AssertionError:
E           --- expected
E           +++ actual
E           @@ -9,14 +9,14 @@
E            ---
E
E            ::: {.cell .code}
E           -``` {.python}
E           +``` python
E            # This is an unfrozen cell. Works as usual.
E            print("I'm a regular cell so I run and print!")
E            ```
E            :::
E
E            ::: {.cell .code deletable="false" editable="false" run_control="{\"frozen\":true}"}
E           -``` {.python}
E           +``` python
E            # This is an frozen cell
E            print("I'm frozen so Im not executed :(")
E            ```

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/compare.py:47: AssertionError
--------------------------------------------------------------------------- Captured stderr call ---------------------------------------------------------------------------
[WARNING] Deprecated: --atx-headers. Use --markdown-headings=atx instead.
________________________________ test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/jupyter.ipynb] ________________________________

nb_file = '/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/jupyter.ipynb', no_jupytext_version_number = None

    @requires_pandoc
    @pytest.mark.parametrize(
        "nb_file",
        list_notebooks("ipynb", skip="(functional|Notebook with|flavors|invalid|305)"),
    )
    def test_ipynb_to_pandoc(nb_file, no_jupytext_version_number):
>       assert_conversion_same_as_mirror(nb_file, "md:pandoc", "ipynb_to_pandoc")

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_mirror.py:138:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_mirror.py:80: in assert_conversion_same_as_mirror
    compare(actual, expected)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

actual = '---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  nbformat: 4\n  n...l .code}\n``` python\na, b, a+b\n```\n:::\n\n::: {.cell .markdown}\nAnd this is already the end of the notebook\n:::\n'
expected = '---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  nbformat: 4\n  n...code}\n``` {.python}\na, b, a+b\n```\n:::\n\n::: {.cell .markdown}\nAnd this is already the end of the notebook\n:::\n'
actual_name = 'actual', expected_name = 'expected', return_diff = False

    def compare(
        actual, expected, actual_name="actual", expected_name="expected", return_diff=False
    ):
        """Compare two strings, lists or dict-like objects"""
        if actual != expected:
            diff = difflib.unified_diff(
                _multilines(expected),
                _multilines(actual),
                expected_name,
                actual_name,
                lineterm="",
            )
            if expected_name == "" and actual_name == "":
                diff = list(diff)[2:]
            diff = "\n".join(diff)
            if return_diff:
                return diff
>           raise AssertionError("\n" + diff)
E           AssertionError:
E           --- expected
E           +++ actual
E           @@ -15,7 +15,7 @@
E            :::
E
E            ::: {.cell .code}
E           -``` {.python}
E           +``` python
E            a = 1
E            b = 2
E            a + b
E           @@ -27,13 +27,13 @@
E            :::
E
E            ::: {.cell .code}
E           -``` {.python}
E           +``` python
E            a, b
E            ```
E            :::
E
E            ::: {.cell .code}
E           -``` {.python}
E           +``` python
E            a, b, a+b
E            ```
E            :::

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/compare.py:47: AssertionError
--------------------------------------------------------------------------- Captured stderr call ---------------------------------------------------------------------------
[WARNING] Deprecated: --atx-headers. Use --markdown-headings=atx instead.
_____________________________ test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/jupyter_again.ipynb] _____________________________

nb_file = '/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/jupyter_again.ipynb', no_jupytext_version_number = None

    @requires_pandoc
    @pytest.mark.parametrize(
        "nb_file",
        list_notebooks("ipynb", skip="(functional|Notebook with|flavors|invalid|305)"),
    )
    def test_ipynb_to_pandoc(nb_file, no_jupytext_version_number):
>       assert_conversion_same_as_mirror(nb_file, "md:pandoc", "ipynb_to_pandoc")

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_mirror.py:138:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_mirror.py:80: in assert_conversion_same_as_mirror
    compare(actual, expected)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

actual = '---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  nbformat: 4\n  n...n``` python\nimport yaml\nprint(yaml.dump(yaml.load(c)))\n```\n:::\n\n::: {.cell .code}\n``` python\n?next\n```\n:::\n'
expected = '---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  nbformat: 4\n  n....python}\nimport yaml\nprint(yaml.dump(yaml.load(c)))\n```\n:::\n\n::: {.cell .code}\n``` {.python}\n?next\n```\n:::\n'
actual_name = 'actual', expected_name = 'expected', return_diff = False

    def compare(
        actual, expected, actual_name="actual", expected_name="expected", return_diff=False
    ):
        """Compare two strings, lists or dict-like objects"""
        if actual != expected:
            diff = difflib.unified_diff(
                _multilines(expected),
                _multilines(actual),
                expected_name,
                actual_name,
                lineterm="",
            )
            if expected_name == "" and actual_name == "":
                diff = list(diff)[2:]
            diff = "\n".join(diff)
            if return_diff:
                return diff
>           raise AssertionError("\n" + diff)
E           AssertionError:
E           --- expected
E           +++ actual
E           @@ -9,7 +9,7 @@
E            ---
E
E            ::: {.cell .code}
E           -``` {.python}
E           +``` python
E            c = '''
E            title: "Quick test"
E            output:
E           @@ -23,14 +23,14 @@
E            :::
E
E            ::: {.cell .code}
E           -``` {.python}
E           +``` python
E            import yaml
E            print(yaml.dump(yaml.load(c)))
E            ```
E            :::
E
E            ::: {.cell .code}
E           -``` {.python}
E           +``` python
E            ?next
E            ```
E            :::

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/compare.py:47: AssertionError
--------------------------------------------------------------------------- Captured stderr call ---------------------------------------------------------------------------
[WARNING] Deprecated: --atx-headers. Use --markdown-headings=atx instead.
_____________________ test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/jupyter_with_raw_cell_in_body.ipynb] _____________________

nb_file = '/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/jupyter_with_raw_cell_in_body.ipynb', no_jupytext_version_number = None

    @requires_pandoc
    @pytest.mark.parametrize(
        "nb_file",
        list_notebooks("ipynb", skip="(functional|Notebook with|flavors|invalid|305)"),
    )
    def test_ipynb_to_pandoc(nb_file, no_jupytext_version_number):
>       assert_conversion_same_as_mirror(nb_file, "md:pandoc", "ipynb_to_pandoc")

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_mirror.py:138:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_mirror.py:80: in assert_conversion_same_as_mirror
    compare(actual, expected)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

actual = '---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  nbformat: 4\n  n...\n::: {.cell .raw}\n```{=ipynb}\nThis is a raw cell\n```\n:::\n\n::: {.cell .markdown}\nThis is a markdown cell\n:::\n'
expected = '---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  nbformat: 4\n  n...\n::: {.cell .raw}\n```{=ipynb}\nThis is a raw cell\n```\n:::\n\n::: {.cell .markdown}\nThis is a markdown cell\n:::\n'
actual_name = 'actual', expected_name = 'expected', return_diff = False

    def compare(
        actual, expected, actual_name="actual", expected_name="expected", return_diff=False
    ):
        """Compare two strings, lists or dict-like objects"""
        if actual != expected:
            diff = difflib.unified_diff(
                _multilines(expected),
                _multilines(actual),
                expected_name,
                actual_name,
                lineterm="",
            )
            if expected_name == "" and actual_name == "":
                diff = list(diff)[2:]
            diff = "\n".join(diff)
            if return_diff:
                return diff
>           raise AssertionError("\n" + diff)
E           AssertionError:
E           --- expected
E           +++ actual
E           @@ -9,7 +9,7 @@
E            ---
E
E            ::: {.cell .code}
E           -``` {.python}
E           +``` python
E            1+2+3
E            ```
E            :::

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/compare.py:47: AssertionError
--------------------------------------------------------------------------- Captured stderr call ---------------------------------------------------------------------------
[WARNING] Deprecated: --atx-headers. Use --markdown-headings=atx instead.
_____________________ test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/jupyter_with_raw_cell_on_top.ipynb] ______________________

nb_file = '/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/jupyter_with_raw_cell_on_top.ipynb', no_jupytext_version_number = None

    @requires_pandoc
    @pytest.mark.parametrize(
        "nb_file",
        list_notebooks("ipynb", skip="(functional|Notebook with|flavors|invalid|305)"),
    )
    def test_ipynb_to_pandoc(nb_file, no_jupytext_version_number):
>       assert_conversion_same_as_mirror(nb_file, "md:pandoc", "ipynb_to_pandoc")

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_mirror.py:138:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_mirror.py:80: in assert_conversion_same_as_mirror
    compare(actual, expected)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

actual = '---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  nbformat: 4\n  n... console\n---\n```\n:::\n\n::: {.cell .code}\n``` python\n1+2+3\n```\n:::\n\n::: {.cell .code}\n``` python\n```\n:::\n'
expected = '---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  nbformat: 4\n  n...le\n---\n```\n:::\n\n::: {.cell .code}\n``` {.python}\n1+2+3\n```\n:::\n\n::: {.cell .code}\n``` {.python}\n```\n:::\n'
actual_name = 'actual', expected_name = 'expected', return_diff = False

    def compare(
        actual, expected, actual_name="actual", expected_name="expected", return_diff=False
    ):
        """Compare two strings, lists or dict-like objects"""
        if actual != expected:
            diff = difflib.unified_diff(
                _multilines(expected),
                _multilines(actual),
                expected_name,
                actual_name,
                lineterm="",
            )
            if expected_name == "" and actual_name == "":
                diff = list(diff)[2:]
            diff = "\n".join(diff)
            if return_diff:
                return diff
>           raise AssertionError("\n" + diff)
E           AssertionError:
E           --- expected
E           +++ actual
E           @@ -23,13 +23,13 @@
E            :::
E
E            ::: {.cell .code}
E           -``` {.python}
E           +``` python
E            1+2+3
E            ```
E            :::
E
E            ::: {.cell .code}
E           -``` {.python}
E           +``` python
E            ```
E            :::

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/compare.py:47: AssertionError
--------------------------------------------------------------------------- Captured stderr call ---------------------------------------------------------------------------
[WARNING] Deprecated: --atx-headers. Use --markdown-headings=atx instead.
____________________ test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/notebook_with_complex_metadata.ipynb] _____________________

nb_file = '/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/notebook_with_complex_metadata.ipynb', no_jupytext_version_number = None

    @requires_pandoc
    @pytest.mark.parametrize(
        "nb_file",
        list_notebooks("ipynb", skip="(functional|Notebook with|flavors|invalid|305)"),
    )
    def test_ipynb_to_pandoc(nb_file, no_jupytext_version_number):
>       assert_conversion_same_as_mirror(nb_file, "md:pandoc", "ipynb_to_pandoc")

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_mirror.py:138:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_mirror.py:80: in assert_conversion_same_as_mirror
    compare(actual, expected)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

actual = '---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  nbformat: 4\n  nbformat_minor: 2\n---\n\n::: {.cell .code}\n``` python\n```\n:::\n'
expected = '---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  nbformat: 4\n  nbformat_minor: 2\n---\n\n::: {.cell .code}\n``` {.python}\n```\n:::\n'
actual_name = 'actual', expected_name = 'expected', return_diff = False

    def compare(
        actual, expected, actual_name="actual", expected_name="expected", return_diff=False
    ):
        """Compare two strings, lists or dict-like objects"""
        if actual != expected:
            diff = difflib.unified_diff(
                _multilines(expected),
                _multilines(actual),
                expected_name,
                actual_name,
                lineterm="",
            )
            if expected_name == "" and actual_name == "":
                diff = list(diff)[2:]
            diff = "\n".join(diff)
            if return_diff:
                return diff
>           raise AssertionError("\n" + diff)
E           AssertionError:
E           --- expected
E           +++ actual
E           @@ -9,7 +9,7 @@
E            ---
E
E            ::: {.cell .code}
E           -``` {.python}
E           +``` python
E            ```
E            :::

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/compare.py:47: AssertionError
--------------------------------------------------------------------------- Captured stderr call ---------------------------------------------------------------------------
[WARNING] Deprecated: --atx-headers. Use --markdown-headings=atx instead.
________________________ test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/nteract_with_parameter.ipynb] _________________________

nb_file = '/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/nteract_with_parameter.ipynb', no_jupytext_version_number = None

    @requires_pandoc
    @pytest.mark.parametrize(
        "nb_file",
        list_notebooks("ipynb", skip="(functional|Notebook with|flavors|invalid|305)"),
    )
    def test_ipynb_to_pandoc(nb_file, no_jupytext_version_number):
>       assert_conversion_same_as_mirror(nb_file, "md:pandoc", "ipynb_to_pandoc")

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_mirror.py:138:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_mirror.py:80: in assert_conversion_same_as_mirror
    compare(actual, expected)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

actual = '---\njupyter:\n  kernel_info:\n    name: python3\n  kernelspec:\n    display_name: Python 3\n    language: python\n  ...ell .code inputHidden="false" outputHidden="false"}\n``` python\n%matplotlib inline\ndf.plot(kind=\'bar\')\n```\n:::\n'
expected = '---\njupyter:\n  kernel_info:\n    name: python3\n  kernelspec:\n    display_name: Python 3\n    language: python\n  ... .code inputHidden="false" outputHidden="false"}\n``` {.python}\n%matplotlib inline\ndf.plot(kind=\'bar\')\n```\n:::\n'
actual_name = 'actual', expected_name = 'expected', return_diff = False

    def compare(
        actual, expected, actual_name="actual", expected_name="expected", return_diff=False
    ):
        """Compare two strings, lists or dict-like objects"""
        if actual != expected:
            diff = difflib.unified_diff(
                _multilines(expected),
                _multilines(actual),
                expected_name,
                actual_name,
                lineterm="",
            )
            if expected_name == "" and actual_name == "":
                diff = list(diff)[2:]
            diff = "\n".join(diff)
            if return_diff:
                return diff
>           raise AssertionError("\n" + diff)
E           AssertionError:
E           --- expected
E           +++ actual
E           @@ -11,19 +11,19 @@
E            ---
E
E            ::: {.cell .code inputHidden="false" outputHidden="false" tags="[\"parameters\"]"}
E           -``` {.python}
E           +``` python
E            param = 4
E            ```
E            :::
E
E            ::: {.cell .code inputHidden="false" outputHidden="false"}
E           -``` {.python}
E           +``` python
E            import pandas as pd
E            ```
E            :::
E
E            ::: {.cell .code inputHidden="false" outputHidden="false"}
E           -``` {.python}
E           +``` python
E            df = pd.DataFrame({'A': [1, 2], 'B': [3 + param, 4]},
E                              index=pd.Index(['x0', 'x1'], name='x'))
E            df
E           @@ -31,7 +31,7 @@
E            :::
E
E            ::: {.cell .code inputHidden="false" outputHidden="false"}
E           -``` {.python}
E           +``` python
E            %matplotlib inline
E            df.plot(kind='bar')
E            ```

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/compare.py:47: AssertionError
--------------------------------------------------------------------------- Captured stderr call ---------------------------------------------------------------------------
[WARNING] Deprecated: --atx-headers. Use --markdown-headings=atx instead.
_____________________________ test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/plotly_graphs.ipynb] _____________________________

nb_file = '/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/plotly_graphs.ipynb', no_jupytext_version_number = None

    @requires_pandoc
    @pytest.mark.parametrize(
        "nb_file",
        list_notebooks("ipynb", skip="(functional|Notebook with|flavors|invalid|305)"),
    )
    def test_ipynb_to_pandoc(nb_file, no_jupytext_version_number):
>       assert_conversion_same_as_mirror(nb_file, "md:pandoc", "ipynb_to_pandoc")

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_mirror.py:138:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_mirror.py:80: in assert_conversion_same_as_mirror
    compare(actual, expected)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

actual = '---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  nbformat: 4\n  n...)],\n    layout=go.Layout(title="bar plot"))\nfig.show()\nfig.data[0].marker = dict(color=\'purple\')\nfig\n```\n:::\n'
expected = '---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  nbformat: 4\n  n...)],\n    layout=go.Layout(title="bar plot"))\nfig.show()\nfig.data[0].marker = dict(color=\'purple\')\nfig\n```\n:::\n'
actual_name = 'actual', expected_name = 'expected', return_diff = False

    def compare(
        actual, expected, actual_name="actual", expected_name="expected", return_diff=False
    ):
        """Compare two strings, lists or dict-like objects"""
        if actual != expected:
            diff = difflib.unified_diff(
                _multilines(expected),
                _multilines(actual),
                expected_name,
                actual_name,
                lineterm="",
            )
            if expected_name == "" and actual_name == "":
                diff = list(diff)[2:]
            diff = "\n".join(diff)
            if return_diff:
                return diff
>           raise AssertionError("\n" + diff)
E           AssertionError:
E           --- expected
E           +++ actual
E           @@ -21,14 +21,14 @@
E            :::
E
E            ::: {.cell .code}
E           -``` {.python}
E           +``` python
E            import plotly.offline as offline
E            offline.init_notebook_mode(connected=True)
E            ```
E            :::
E
E            ::: {.cell .code}
E           -``` {.python}
E           +``` python
E            import plotly.graph_objects as go
E            fig = go.Figure(
E                data=[go.Bar(y=[2, 3, 1])],

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/compare.py:47: AssertionError
--------------------------------------------------------------------------- Captured stderr call ---------------------------------------------------------------------------
[WARNING] Deprecated: --atx-headers. Use --markdown-headings=atx instead.
________________________ test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/sample_rise_notebook_66.ipynb] ________________________

nb_file = '/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/sample_rise_notebook_66.ipynb', no_jupytext_version_number = None

    @requires_pandoc
    @pytest.mark.parametrize(
        "nb_file",
        list_notebooks("ipynb", skip="(functional|Notebook with|flavors|invalid|305)"),
    )
    def test_ipynb_to_pandoc(nb_file, no_jupytext_version_number):
>       assert_conversion_same_as_mirror(nb_file, "md:pandoc", "ipynb_to_pandoc")

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_mirror.py:138:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_mirror.py:80: in assert_conversion_same_as_mirror
    compare(actual, expected)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

actual = '---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  nbformat: 4\n  n...:\n\n::: {.cell .markdown cell_style="center" slideshow="{\\"slide_type\\":\\"fragment\\"}"}\nMarkdown cell two\n:::\n'
expected = '---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  nbformat: 4\n  n...:\n\n::: {.cell .markdown cell_style="center" slideshow="{\\"slide_type\\":\\"fragment\\"}"}\nMarkdown cell two\n:::\n'
actual_name = 'actual', expected_name = 'expected', return_diff = False

    def compare(
        actual, expected, actual_name="actual", expected_name="expected", return_diff=False
    ):
        """Compare two strings, lists or dict-like objects"""
        if actual != expected:
            diff = difflib.unified_diff(
                _multilines(expected),
                _multilines(actual),
                expected_name,
                actual_name,
                lineterm="",
            )
            if expected_name == "" and actual_name == "":
                diff = list(diff)[2:]
            diff = "\n".join(diff)
            if return_diff:
                return diff
>           raise AssertionError("\n" + diff)
E           AssertionError:
E           --- expected
E           +++ actual
E           @@ -13,7 +13,7 @@
E            :::
E
E            ::: {.cell .code slideshow="{\"slide_type\":\"\"}"}
E           -``` {.python}
E           +``` python
E            1+1
E            ```
E            :::

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/compare.py:47: AssertionError
--------------------------------------------------------------------------- Captured stderr call ---------------------------------------------------------------------------
[WARNING] Deprecated: --atx-headers. Use --markdown-headings=atx instead.
________________________ test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/text_outputs_and_images.ipynb] ________________________

nb_file = '/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/text_outputs_and_images.ipynb', no_jupytext_version_number = None

    @requires_pandoc
    @pytest.mark.parametrize(
        "nb_file",
        list_notebooks("ipynb", skip="(functional|Notebook with|flavors|invalid|305)"),
    )
    def test_ipynb_to_pandoc(nb_file, no_jupytext_version_number):
>       assert_conversion_same_as_mirror(nb_file, "md:pandoc", "ipynb_to_pandoc")

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_mirror.py:138:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_mirror.py:80: in assert_conversion_same_as_mirror
    compare(actual, expected)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

actual = "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  nbformat: 4\n  n...w()\n```\n:::\n\n::: {.cell .markdown}\n# Errors\n:::\n\n::: {.cell .code}\n``` python\nundefined_variable\n```\n:::\n"
expected = "---\njupyter:\n  kernelspec:\n    display_name: Python 3\n    language: python\n    name: python3\n  nbformat: 4\n  n...\n```\n:::\n\n::: {.cell .markdown}\n# Errors\n:::\n\n::: {.cell .code}\n``` {.python}\nundefined_variable\n```\n:::\n"
actual_name = 'actual', expected_name = 'expected', return_diff = False

    def compare(
        actual, expected, actual_name="actual", expected_name="expected", return_diff=False
    ):
        """Compare two strings, lists or dict-like objects"""
        if actual != expected:
            diff = difflib.unified_diff(
                _multilines(expected),
                _multilines(actual),
                expected_name,
                actual_name,
                lineterm="",
            )
            if expected_name == "" and actual_name == "":
                diff = list(diff)[2:]
            diff = "\n".join(diff)
            if return_diff:
                return diff
>           raise AssertionError("\n" + diff)
E           AssertionError:
E           --- expected
E           +++ actual
E           @@ -19,7 +19,7 @@
E            :::
E
E            ::: {.cell .code}
E           -``` {.python}
E           +``` python
E            import sys
E            print('using print')
E            sys.stdout.write('using sys.stdout.write')
E           @@ -28,7 +28,7 @@
E            :::
E
E            ::: {.cell .code}
E           -``` {.python}
E           +``` python
E            import logging
E            logging.debug('Debug')
E            logging.info('Info')
E           @@ -44,14 +44,14 @@
E            :::
E
E            ::: {.cell .code}
E           -``` {.python}
E           +``` python
E            import pandas as pd
E            pd.DataFrame([4])
E            ```
E            :::
E
E            ::: {.cell .code}
E           -``` {.python}
E           +``` python
E            from IPython.display import display
E            display(pd.DataFrame([5]))
E            display(pd.DataFrame([6]))
E           @@ -63,13 +63,13 @@
E            :::
E
E            ::: {.cell .code}
E           -``` {.python}
E           +``` python
E            %matplotlib inline
E            ```
E            :::
E
E            ::: {.cell .code}
E           -``` {.python}
E           +``` python
E            # First plot
E            from matplotlib import pyplot as plt
E            import numpy as np
E           @@ -95,7 +95,7 @@
E            :::
E
E            ::: {.cell .code}
E           -``` {.python}
E           +``` python
E            undefined_variable
E            ```
E            :::

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/compare.py:47: AssertionError
--------------------------------------------------------------------------- Captured stderr call ---------------------------------------------------------------------------
[WARNING] Deprecated: --atx-headers. Use --markdown-headings=atx instead.
______________________________ test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_R/ir_notebook.ipynb] _______________________________

nb_file = '/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_R/ir_notebook.ipynb', no_jupytext_version_number = None

    @requires_pandoc
    @pytest.mark.parametrize(
        "nb_file",
        list_notebooks("ipynb", skip="(functional|Notebook with|flavors|invalid|305)"),
    )
    def test_ipynb_to_pandoc(nb_file, no_jupytext_version_number):
>       assert_conversion_same_as_mirror(nb_file, "md:pandoc", "ipynb_to_pandoc")

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_mirror.py:138:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_mirror.py:80: in assert_conversion_same_as_mirror
    compare(actual, expected)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

actual = '---\njupyter:\n  kernelspec:\n    display_name: R\n    language: R\n    name: ir\n  nbformat: 4\n  nbformat_minor: 2\...\n``` R\nsum(1:10)\n```\n:::\n\n::: {.cell .code}\n``` R\nplot(cars)\n```\n:::\n\n::: {.cell .code}\n``` R\n```\n:::\n'
expected = '---\njupyter:\n  kernelspec:\n    display_name: R\n    language: R\n    name: ir\n  nbformat: 4\n  nbformat_minor: 2\...}\nsum(1:10)\n```\n:::\n\n::: {.cell .code}\n``` {.R}\nplot(cars)\n```\n:::\n\n::: {.cell .code}\n``` {.R}\n```\n:::\n'
actual_name = 'actual', expected_name = 'expected', return_diff = False

    def compare(
        actual, expected, actual_name="actual", expected_name="expected", return_diff=False
    ):
        """Compare two strings, lists or dict-like objects"""
        if actual != expected:
            diff = difflib.unified_diff(
                _multilines(expected),
                _multilines(actual),
                expected_name,
                actual_name,
                lineterm="",
            )
            if expected_name == "" and actual_name == "":
                diff = list(diff)[2:]
            diff = "\n".join(diff)
            if return_diff:
                return diff
>           raise AssertionError("\n" + diff)
E           AssertionError:
E           --- expected
E           +++ actual
E           @@ -13,19 +13,19 @@
E            :::
E
E            ::: {.cell .code}
E           -``` {.R}
E           +``` R
E            sum(1:10)
E            ```
E            :::
E
E            ::: {.cell .code}
E           -``` {.R}
E           +``` R
E            plot(cars)
E            ```
E            :::
E
E            ::: {.cell .code}
E           -``` {.R}
E           +``` R
E            ```
E            :::

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/compare.py:47: AssertionError
--------------------------------------------------------------------------- Captured stderr call ---------------------------------------------------------------------------
[WARNING] Deprecated: --atx-headers. Use --markdown-headings=atx instead.
_____________________________________________________________ test_jupytext_commands_in_the_documentation_work _____________________________________________________________

tmpdir = local('/tmp/pytest-of-tkloczko/pytest-128/test_jupytext_commands_in_the_0')

    @requires_black
    @requires_myst
    @pytest.mark.skipif(
        not os.path.isdir(doc_path), reason="Documentation folder is missing"
    )
    def test_jupytext_commands_in_the_documentation_work(tmpdir):
        # Read the documentation as a bash notebook
        using_cli = os.path.join(doc_path, "using-cli.md")
        assert os.path.isfile(using_cli)
        using_cli_nb = jupytext.read(using_cli)

        # Run the commands in tmpdir on a sample notebook
        jupytext.write(
            new_notebook(cells=[new_code_cell("1+1")]), str(tmpdir.join("notebook.ipynb"))
        )
        os.chdir(str(tmpdir))

        cmd_tested = 0
        for cell in using_cli_nb.cells:
            if cell.cell_type != "code":
                continue
            if not cell.source.startswith("jupytext"):
                continue
            for cmd in cell.source.splitlines():
                if not cmd.startswith("jupytext"):
                    continue

                # Do not test commands that involve reading a notebook from stdin
                if "read ipynb from stdin" in cmd:
                    continue

                # We can't run pytest inside pytest
                if "pytest {}" in cmd:
                    continue

                # We need to remove the comments that may follow the jupytext command
                if "#" in cmd:
                    left, comment = cmd.rsplit("#", 1)
                    if '"' not in comment:
                        cmd = left

                print("Testing: {}".format(cmd))
                args = shlex.split(cmd)[1:]
>               assert not jupytext_cli(args), cmd

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/test_using_cli.py:58:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/cli.py:489: in jupytext
    exit_code += jupytext_single_file(nb_file, args, log)
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/cli.py:593: in jupytext_single_file
    kernelspec = kernelspec_from_language(language)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

language = 'python'

    def kernelspec_from_language(language):
        """Return the python kernel that matches the current env, or the first kernel that matches the given language"""
        if language == "python":
            # Return the kernel that matches the current Python executable
            for name in find_kernel_specs():
                kernel_specs = get_kernel_spec(name)
                cmd = kernel_specs.argv[0]
                if (
                    kernel_specs.language == "python"
                    and os.path.isfile(cmd)
                    and os.path.samefile(cmd, sys.executable)
                ):
                    return {
                        "name": name,
                        "language": language,
                        "display_name": kernel_specs.display_name,
                    }
>           raise ValueError(
                "No kernel found that matches the current python executable {}\n".format(
                    sys.executable
                )
                + "Install one with 'python -m ipykernel install --name kernel_name [--user]'"
            )
E           ValueError: No kernel found that matches the current python executable /usr/bin/python3
E           Install one with 'python -m ipykernel install --name kernel_name [--user]'

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/kernels.py:46: ValueError
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
Testing: jupytext --to py notebook.ipynb
[jupytext] Reading notebook.ipynb in format ipynb
[jupytext] Writing notebook.py
Testing: jupytext --to py:percent notebook.ipynb
[jupytext] Reading notebook.ipynb in format ipynb
[jupytext] Writing notebook.py in format py:percent (destination file replaced [use --update to preserve cell outputs and ids])
Testing: jupytext --to py:percent --opt comment_magics=false notebook.ipynb
[jupytext] Reading notebook.ipynb in format ipynb
[jupytext] Writing notebook.py in format py:percent (destination file replaced [use --update to preserve cell outputs and ids])
Testing: jupytext --to markdown notebook.ipynb
[jupytext] Reading notebook.ipynb in format ipynb
[jupytext] Writing notebook.md
Testing: jupytext --output script.py notebook.ipynb
[jupytext] Reading notebook.ipynb in format ipynb
[jupytext] Writing script.py
Testing: jupytext --to notebook notebook.py
[jupytext] Reading notebook.py in format py
[jupytext] Writing notebook.ipynb (destination file replaced [use --update to preserve cell outputs and ids])
Testing: jupytext --update --to notebook notebook.py
[jupytext] Reading notebook.py in format py
Testing: jupytext --to md --test notebook.ipynb
[jupytext] Reading notebook.ipynb in format ipynb
Testing: jupytext --to md --output - notebook.ipynb
---
jupyter:
  jupytext:
    comment_magics: false
    main_language: python
    text_representation:
      extension: .md
      format_name: markdown
      format_version: '1.3'
      jupytext_version: 1.13.6
---

```python
1+1

Testing: jupytext --set-formats ipynb,py notebook.ipynb
[jupytext] Reading notebook.ipynb in format ipynb
[jupytext] Updating notebook metadata with '{"jupytext": {"formats": "ipynb,py"}}'
[jupytext] Updating notebook.ipynb
[jupytext] Updating notebook.py
Testing: jupytext --sync notebook.ipynb
[jupytext] Reading notebook.ipynb in format ipynb
[jupytext] Loading notebook.py
[jupytext] Updating the timestamp of notebook.py
Testing: jupytext --set-kernel - notebook.md
[jupytext] Reading notebook.md in format md
============================================================================= warnings summary =============================================================================
jupytext/cell_reader.py:20
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/jupytext/cell_reader.py:20: UserWarning: Sphinx Gallery in version 0.10.1 is not supported by Jupytext. Please use sphinx-gallery<=0.7.0 instead. If that is an issue, feel free to report it at https://github.com/mwouts/jupytext/issues, or even better, prepare a PR to handle the new signature of sphinx_gallery.notebook.rst2md.
warnings.warn(

tests/test_cli.py::test_format_prefix_suffix
[warning] You might have passed a file name to the '--to' option, when a format description was expected. Maybe you want to use the '-o' option instead?

tests/test_contentsmanager.py: 48 warnings
[warning] GObject.GError is deprecated; use GLib.GError instead

-- Docs: https://docs.pytest.org/en/stable/warnings.html
========================================================================= short test summary info ==========================================================================
SKIPPED [1] tests/test_auto_ext.py:36: No file_extension in language_info
SKIPPED [1] tests/test_black.py:68: autopep8 not found
SKIPPED [1] tests/test_black.py:79: flake8 not found
SKIPPED [1] tests/test_cli.py:807: sphinx_gallery is not available
SKIPPED [1] tests/test_cli.py:1231: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [7] tests/test_contentsmanager.py:204: quarto>=0.2 is not available
SKIPPED [1] tests/test_contentsmanager.py:1290: sphinx_gallery is not available
SKIPPED [2] tests/test_contentsmanager.py:1867: jupyterfs is not available
SKIPPED [1] tests/test_execute.py:150: irkernel is not installed
SKIPPED [1] tests/test_ipynb_to_myst.py:162: myst is available
SKIPPED [1] tests/test_ipynb_to_myst.py:171: myst is available
SKIPPED [1] tests/test_isort.py:8: isort not found
SKIPPED [7] tests/test_mirror.py:141: quarto>=0.2 is not available
SKIPPED [11] tests/test_mirror.py:168: sphinx_gallery is not available
SKIPPED [1] tests/test_mirror.py:219: sphinx_gallery is not available
SKIPPED [1] tests/test_mirror.py:225: sphinx_gallery is not available
SKIPPED [1] tests/test_pre_commit_0_ipynb_to_py.py:16: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_1_sync.py:17: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_1_sync_with_config.py:14: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_2_sync_nbstripout.py:14: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_3_sync_black_nbstripout.py:13: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_4_sync_execute.py:15: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_5_reformat_markdown.py:15: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_scripts.py:219: flake8 not found
SKIPPED [1] tests/test_read_empty_text_notebook.py:14: quarto is not available
SKIPPED [1] tests/test_read_simple_pandoc.py:82: Pandoc is installed
SKIPPED [1] tests/test_read_simple_quarto.py:9: quarto>=0.2 is not available
XFAIL tests/test_auto_ext.py::test_auto_from_kernelspecs_works[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_sage/sage_print_hello.ipynb]
reason: Sage notebooks have Python in their language_info metadata, see #727
FAILED tests/test_black.py::test_apply_black_through_jupytext[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/Line_breaks_in_LateX_305.ipynb] - Fi...
FAILED tests/test_cli.py::test_set_kernel_inplace[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/python/light_sample.py] - ValueError: No kernel found tha...
FAILED tests/test_cli.py::test_set_kernel_inplace[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/python/python_notebook_sample.py] - ValueError: No kernel...
FAILED tests/test_cli.py::test_set_kernel_auto[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/python/light_sample.py] - ValueError: No kernel found that m...
FAILED tests/test_cli.py::test_set_kernel_auto[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/python/python_notebook_sample.py] - ValueError: No kernel fo...
FAILED tests/test_cli.py::test_set_kernel_works_with_pipes_326 - ValueError: No kernel found that matches the current python executable /usr/bin/python3
FAILED tests/test_cli.py::test_utf8_out_331 - ValueError: No kernel found that matches the current python executable /usr/bin/python3
FAILED tests/test_cli.py::test_create_header_with_set_formats_and_set_kernel[md] - ValueError: No kernel found that matches the current python executable /usr/bin/python3
FAILED tests/test_cli.py::test_create_header_with_set_formats_and_set_kernel[md:myst] - ValueError: No kernel found that matches the current python executable /usr/bin/p...
FAILED tests/test_cli.py::test_create_header_with_set_formats_and_set_kernel[md:pandoc] - ValueError: No kernel found that matches the current python executable /usr/bin...
FAILED tests/test_cli.py::test_create_header_with_set_formats_and_set_kernel[py:light] - ValueError: No kernel found that matches the current python executable /usr/bin/...
FAILED tests/test_cli.py::test_create_header_with_set_formats_and_set_kernel[py:percent] - ValueError: No kernel found that matches the current python executable /usr/bi...
FAILED tests/test_contentsmanager.py::test_python_kernel_preserves_R_files[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/R/simple_r_script.R] - ValueErro...
FAILED tests/test_execute.py::test_execute - ValueError: No kernel found that matches the current python executable /usr/bin/python3
FAILED tests/test_execute.py::test_execute_readme_ok - ValueError: No kernel found that matches the current python executable /usr/bin/python3
FAILED tests/test_execute.py::test_execute_readme_not_ok - ValueError: No kernel found that matches the current python executable /usr/bin/python3
FAILED tests/test_execute.py::test_execute_sync - ValueError: No kernel found that matches the current python executable /usr/bin/python3
FAILED tests/test_execute.py::test_execute_in_subfolder - ValueError: No kernel found that matches the current python executable /usr/bin/python3
FAILED tests/test_mirror.py::test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_julia/julia_benchmark_plotly_barchart.ipynb] - Asse...
FAILED tests/test_mirror.py::test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/Notebook_with_R_magic.ipynb] - AssertionError:
FAILED tests/test_mirror.py::test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/Notebook_with_more_R_magic_111.ipynb] - Assertio...
FAILED tests/test_mirror.py::test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/World population.ipynb] - AssertionError:
FAILED tests/test_mirror.py::test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/cat_variable.ipynb] - AssertionError:
FAILED tests/test_mirror.py::test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/convert_to_py_then_test_with_update83.ipynb] - A...
FAILED tests/test_mirror.py::test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/frozen_cell.ipynb] - AssertionError:
FAILED tests/test_mirror.py::test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/jupyter.ipynb] - AssertionError:
FAILED tests/test_mirror.py::test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/jupyter_again.ipynb] - AssertionError:
FAILED tests/test_mirror.py::test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/jupyter_with_raw_cell_in_body.ipynb] - Assertion...
FAILED tests/test_mirror.py::test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/jupyter_with_raw_cell_on_top.ipynb] - AssertionE...
FAILED tests/test_mirror.py::test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/notebook_with_complex_metadata.ipynb] - Assertio...
FAILED tests/test_mirror.py::test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/nteract_with_parameter.ipynb] - AssertionError:
FAILED tests/test_mirror.py::test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/plotly_graphs.ipynb] - AssertionError:
FAILED tests/test_mirror.py::test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/sample_rise_notebook_66.ipynb] - AssertionError:
FAILED tests/test_mirror.py::test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_py/text_outputs_and_images.ipynb] - AssertionError:
FAILED tests/test_mirror.py::test_ipynb_to_pandoc[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.6/tests/notebooks/ipynb_R/ir_notebook.ipynb] - AssertionError:
FAILED tests/test_using_cli.py::test_jupytext_commands_in_the_documentation_work - ValueError: No kernel found that matches the current python executable /usr/bin/python3
============================================= 36 failed, 2621 passed, 50 skipped, 1 xfailed, 50 warnings in 148.36s (0:02:28) ==============================================

</details>

@mwouts mwouts added this to the 1.13.7 milestone Feb 4, 2022
@mwouts
Copy link
Owner

mwouts commented Feb 4, 2022

Hi @kloczek , thank you for the report!

First I have a question for you - would you be interested in automating the build of the RPM package? Do you think we could do this on our CI with an appropriate GitHub action? Hopefully that could spare you some time and also I guess I would break less often the RPM packaging process 😄

Regarding the test failures, I think the current conditions for skipping some tests are not appropriate for your environment. In particular I see these two errors:

  1. No kernel found that matches the current python executable /usr/bin/python3 We should add a skip condition for that, I'll be happy to contribute this when I better know how to reproduce the packaging process (which Linux distribution, etc)
  2. test_mirror.py::test_ipynb_to_pandoc: I'd say that we are not using the same version of pandoc, so the condition for enabling these tests (is_pandoc_available) should be improved.

@mwouts
Copy link
Owner

mwouts commented Feb 9, 2022

Hi @kloczek , I have tried to fix a few of the failures in this branch - can you tell me if you still see issues with that branch?

Regarding the version of jupyter_packaging I am afraid that changing the version might have side effects - I'll have a look later on.

@kloczek
Copy link
Author

kloczek commented Feb 9, 2022

First I have a question for you - would you be interested in automating the build of the RPM package? Do you think we could do this on our CI with an appropriate GitHub action? Hopefully that could spare you some time and also I guess I would break less often the RPM packaging process 😄

I have already such automation 😄
IMO building in CI rpm package does not make to much sense because details of the build, install and testing procedure may depend on OS distribution which are using usiually different versions of the python and exaxct moodules.

Hi @kloczek , I have tried to fix a few of the failures in this branch - can you tell me if you still see issues with that branch?

WIll check that ASP. Thank you 😄

@mwouts
Copy link
Owner

mwouts commented Feb 9, 2022

I have tried to fix a few of the failures in this branch

FYI I have merged this into main already, as they happened to fix some issues I was also having locally.

MO building in CI rpm package does not make to much sense because details of the build, install and testing procedure may depend on OS distribution which are using usually different versions of the python and exact modules.

Well maybe it is already a good thing if this work on the Linux distribution made available on GitHub actions?

@kloczek
Copy link
Author

kloczek commented Feb 10, 2022

Just tested 1.13.7.
I still must use my patch to relax build dependencies however looks like some progress has been made because now are failing only four units

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-jupytext-1.13.7-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-jupytext-1.13.7-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.12, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jupytext-1.13.7, configfile: pyproject.toml
plugins: anyio-3.3.4, black-0.3.12
collected 2731 items

tests/test_active_cells.py ............................                                                                                                              [  1%]
tests/test_auto_ext.py ...............................................................x.s.......................                                                     [  4%]
tests/test_black.py ...sss.......                                                                                                                                    [  4%]
tests/test_cell_id.py .                                                                                                                                              [  4%]
tests/test_cell_markers.py ..                                                                                                                                        [  4%]
tests/test_cell_metadata.py ............................................................                                                                             [  7%]
tests/test_cells.py ................                                                                                                                                 [  7%]
tests/test_changelog.py ...                                                                                                                                          [  7%]
tests/test_cli.py .................................................................................................................................................. [ 13%]
..........ssssss........................................sssssssssssssss........................................................................................ss... [ 19%]
s........................................................................ssssssss...s......s.................                                                        [ 23%]
tests/test_cli_check.py ..                                                                                                                                           [ 23%]
tests/test_cli_config.py ...........                                                                                                                                 [ 23%]
tests/test_cm_config.py ..............                                                                                                                               [ 24%]
tests/test_combine.py ....................................................                                                                                           [ 25%]
tests/test_compare.py .....................                                                                                                                          [ 26%]
tests/test_config.py ..................                                                                                                                              [ 27%]
tests/test_contentsmanager.py ...................................................ssssssssssssssssssssssss........................................................... [ 32%]
.................................................................................................................................................................... [ 38%]
......................................................................................................................................F..s.......................... [ 44%]
...........ss                                                                                                                                                        [ 44%]
tests/test_custom_cell_magics.py .                                                                                                                                   [ 44%]
tests/test_doc_files_are_notebooks.py ...............                                                                                                                [ 45%]
tests/test_doxygen.py ..........                                                                                                                                     [ 45%]
tests/test_escape_magics.py ................................................................................                                                         [ 48%]
tests/test_execute.py ssssssssFF                                                                                                                                     [ 49%]
tests/test_formats.py .........................s........                                                                                                             [ 50%]
tests/test_header.py ..........                                                                                                                                      [ 50%]
tests/test_hide_remove_input_outputs_rmarkdown.py ........                                                                                                           [ 50%]
tests/test_invalid_file.py ...                                                                                                                                       [ 51%]
tests/test_ipynb_to_R.py ....                                                                                                                                        [ 51%]
tests/test_ipynb_to_myst.py .......ss...                                                                                                                             [ 51%]
tests/test_ipynb_to_py.py ....................                                                                                                                       [ 52%]
tests/test_ipynb_to_rmd.py ........................                                                                                                                  [ 53%]
tests/test_isort.py s                                                                                                                                                [ 53%]
tests/test_jupytext_errors.py ..                                                                                                                                     [ 53%]
tests/test_jupytext_nbconvert_round_trip.py .......................                                                                                                  [ 54%]
tests/test_jupytext_read.py ..                                                                                                                                       [ 54%]
tests/test_knitr_spin.py .                                                                                                                                           [ 54%]
tests/test_load_multiple.py ..                                                                                                                                       [ 54%]
tests/test_markdown_in_code_cells.py ....                                                                                                                            [ 54%]
tests/test_metadata_filter.py .................                                                                                                                      [ 55%]
tests/test_metadata_filters_from_config.py .                                                                                                                         [ 55%]
tests/test_mirror.py ............................................................................................................................................... [ 60%]
............................................................................................ssssssssssssssssssssssss............................................ssss [ 66%]
sssssss...............ss.....................................................................................................                                        [ 71%]
tests/test_nbformat_version.py .......                                                                                                                               [ 71%]
tests/test_paired_paths.py ......................                                                                                                                    [ 72%]
tests/test_pep8.py ..............................................................................................................................                    [ 76%]
tests/test_pre_commit_0_ipynb_to_py.py s                                                                                                                             [ 76%]
tests/test_pre_commit_1_sync.py s                                                                                                                                    [ 76%]
tests/test_pre_commit_1_sync_with_config.py s                                                                                                                        [ 76%]
tests/test_pre_commit_2_sync_nbstripout.py s                                                                                                                         [ 76%]
tests/test_pre_commit_3_sync_black_nbstripout.py s                                                                                                                   [ 76%]
tests/test_pre_commit_4_sync_execute.py s                                                                                                                            [ 76%]
tests/test_pre_commit_5_reformat_markdown.py s                                                                                                                       [ 76%]
tests/test_pre_commit_mode.py ............                                                                                                                           [ 77%]
tests/test_pre_commit_scripts.py ....s..s                                                                                                                            [ 77%]
tests/test_preserve_empty_cells.py .......                                                                                                                           [ 77%]
tests/test_pytest.py ..                                                                                                                                              [ 78%]
tests/test_raw_strings.py .........                                                                                                                                  [ 78%]
tests/test_read_all_py.py .....................................................................................................................                      [ 82%]
tests/test_read_dotnet_try_markdown.py ...                                                                                                                           [ 82%]
tests/test_read_empty_text_notebook.py ........................s...........                                                                                          [ 84%]
tests/test_read_folding_markers.py .....                                                                                                                             [ 84%]
tests/test_read_incomplete_rmd.py ...                                                                                                                                [ 84%]
tests/test_read_simple_R.py ............                                                                                                                             [ 84%]
tests/test_read_simple_clojure.py .                                                                                                                                  [ 84%]
tests/test_read_simple_csharp.py .......                                                                                                                             [ 85%]
tests/test_read_simple_groovy.py .                                                                                                                                   [ 85%]
tests/test_read_simple_hydrogen.py .......                                                                                                                           [ 85%]
tests/test_read_simple_ipynb.py .                                                                                                                                    [ 85%]
tests/test_read_simple_java.py .                                                                                                                                     [ 85%]
tests/test_read_simple_julia.py .                                                                                                                                    [ 85%]
tests/test_read_simple_markdown.py ....................................                                                                                              [ 86%]
tests/test_read_simple_matlab.py ..                                                                                                                                  [ 86%]
tests/test_read_simple_nomarker.py ..                                                                                                                                [ 86%]
tests/test_read_simple_ocaml.py ..                                                                                                                                   [ 87%]
tests/test_read_simple_pandoc.py ssss.                                                                                                                               [ 87%]
tests/test_read_simple_percent.py ......................                                                                                                             [ 88%]
tests/test_read_simple_python.py ................................................                                                                                    [ 89%]
tests/test_read_simple_quarto.py s                                                                                                                                   [ 89%]
tests/test_read_simple_rmd.py ..........                                                                                                                             [ 90%]
tests/test_read_simple_rust.py ...                                                                                                                                   [ 90%]
tests/test_read_simple_scheme.py .                                                                                                                                   [ 90%]
tests/test_read_simple_sphinx.py ...                                                                                                                                 [ 90%]
tests/test_read_write_functions.py .....                                                                                                                             [ 90%]
tests/test_remove_encoding.py .                                                                                                                                      [ 90%]
tests/test_rmd_to_ipynb.py ......                                                                                                                                    [ 90%]
tests/test_save_multiple.py .....................................................                                                                                    [ 92%]
tests/test_stringparser.py ....                                                                                                                                      [ 92%]
tests/test_trust_notebook.py .................................................                                                                                       [ 94%]
tests/test_unicode.py ................................                                                                                                               [ 95%]
tests/test_using_cli.py F                                                                                                                                            [ 95%]
tests/test_write_does_not_modify_notebook.py ..............................................................................................................          [100%]

================================================================================= FAILURES =================================================================================
_________________________ test_python_kernel_preserves_R_files[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.7/tests/notebooks/R/simple_r_script.R] __________________________

nb_file = '/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.7/tests/notebooks/R/simple_r_script.R'
tmpdir = local('/tmp/pytest-of-tkloczko/pytest-0/test_python_kernel_preserves_R0')

    @pytest.mark.parametrize("nb_file", list_notebooks("R"))
    def test_python_kernel_preserves_R_files(nb_file, tmpdir):
        """Opening a R file with a Jupyter server that has no R kernel should not modify the file"""
        tmp_r_file = str(tmpdir.join("script.R"))
        with open(nb_file) as fp:
            script = fp.read()
        with open(tmp_r_file, "w") as fp:
            fp.write(script)

        # create contents manager
        cm = jupytext.TextFileContentsManager()
        cm.root_dir = str(tmpdir)

        # open notebook, set Python kernel and save
        model = cm.get("script.R")
>       model["content"].metadata["kernelspec"] = kernelspec_from_language("python")

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.7/tests/test_contentsmanager.py:1233:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

language = 'python'

    def kernelspec_from_language(language):
        """Return the python kernel that matches the current env, or the first kernel that matches the given language"""
        if language == "python":
            # Return the kernel that matches the current Python executable
            for name in find_kernel_specs():
                kernel_specs = get_kernel_spec(name)
                cmd = kernel_specs.argv[0]
                if (
                    kernel_specs.language == "python"
                    and os.path.isfile(cmd)
                    and os.path.samefile(cmd, sys.executable)
                ):
                    return {
                        "name": name,
                        "language": language,
                        "display_name": kernel_specs.display_name,
                    }
>           raise ValueError(
                "No kernel found that matches the current python executable {}\n".format(
                    sys.executable
                )
                + "Install one with 'python -m ipykernel install --name kernel_name [--user]'"
            )
E           ValueError: No kernel found that matches the current python executable /usr/bin/python3
E           Install one with 'python -m ipykernel install --name kernel_name [--user]'

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.7/jupytext/kernels.py:46: ValueError
_____________________________________________________________ test_execute_text_file_does_update_the_metadata ______________________________________________________________

sample_md_notebook = "---\njupyter:\n  jupytext:\n    text_representation:\n      extension: .md\n      format_name: markdown\n      format_version: '1.1'\n      jupytext_version: 1.1.0\n---\n\n```python\n1 + 1\n```\n"
tmp_path = PosixPath('/tmp/pytest-of-tkloczko/pytest-0/test_execute_text_file_does_up0')

    def test_execute_text_file_does_update_the_metadata(sample_md_notebook, tmp_path):
        md_file = tmp_path / "nb.md"
        md_file.write_text(sample_md_notebook)

>       jupytext([str(md_file), "--execute"])

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.7/tests/test_execute.py:270:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.7/jupytext/cli.py:488: in jupytext
    exit_code += jupytext_single_file(nb_file, args, log)
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.7/jupytext/cli.py:588: in jupytext_single_file
    kernelspec = kernelspec_from_language(language)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

language = 'python'

    def kernelspec_from_language(language):
        """Return the python kernel that matches the current env, or the first kernel that matches the given language"""
        if language == "python":
            # Return the kernel that matches the current Python executable
            for name in find_kernel_specs():
                kernel_specs = get_kernel_spec(name)
                cmd = kernel_specs.argv[0]
                if (
                    kernel_specs.language == "python"
                    and os.path.isfile(cmd)
                    and os.path.samefile(cmd, sys.executable)
                ):
                    return {
                        "name": name,
                        "language": language,
                        "display_name": kernel_specs.display_name,
                    }
>           raise ValueError(
                "No kernel found that matches the current python executable {}\n".format(
                    sys.executable
                )
                + "Install one with 'python -m ipykernel install --name kernel_name [--user]'"
            )
E           ValueError: No kernel found that matches the current python executable /usr/bin/python3
E           Install one with 'python -m ipykernel install --name kernel_name [--user]'

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.7/jupytext/kernels.py:46: ValueError
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
[jupytext] Reading /tmp/pytest-of-tkloczko/pytest-0/test_execute_text_file_does_up0/nb.md in format md
______________________________________________________________ test_cat_execute_does_not_update_the_metadata _______________________________________________________________

sample_md_notebook = "---\njupyter:\n  jupytext:\n    text_representation:\n      extension: .md\n      format_name: markdown\n      format_version: '1.1'\n      jupytext_version: 1.1.0\n---\n\n```python\n1 + 1\n```\n"
tmp_path = PosixPath('/tmp/pytest-of-tkloczko/pytest-0/test_cat_execute_does_not_upda0')

    def test_cat_execute_does_not_update_the_metadata(sample_md_notebook, tmp_path):
        md_file = tmp_path / "nb.md"
        md_file.write_text(sample_md_notebook)

        # read md notebook on stdin - this does the same as
        # cat notebook.md | jupytext --execute
        with open(md_file) as fp, mock.patch("sys.stdin", fp):
>           jupytext(["--execute"])

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.7/tests/test_execute.py:284:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.7/jupytext/cli.py:488: in jupytext
    exit_code += jupytext_single_file(nb_file, args, log)
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.7/jupytext/cli.py:588: in jupytext_single_file
    kernelspec = kernelspec_from_language(language)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

language = 'python'

    def kernelspec_from_language(language):
        """Return the python kernel that matches the current env, or the first kernel that matches the given language"""
        if language == "python":
            # Return the kernel that matches the current Python executable
            for name in find_kernel_specs():
                kernel_specs = get_kernel_spec(name)
                cmd = kernel_specs.argv[0]
                if (
                    kernel_specs.language == "python"
                    and os.path.isfile(cmd)
                    and os.path.samefile(cmd, sys.executable)
                ):
                    return {
                        "name": name,
                        "language": language,
                        "display_name": kernel_specs.display_name,
                    }
>           raise ValueError(
                "No kernel found that matches the current python executable {}\n".format(
                    sys.executable
                )
                + "Install one with 'python -m ipykernel install --name kernel_name [--user]'"
            )
E           ValueError: No kernel found that matches the current python executable /usr/bin/python3
E           Install one with 'python -m ipykernel install --name kernel_name [--user]'

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.7/jupytext/kernels.py:46: ValueError
_____________________________________________________________ test_jupytext_commands_in_the_documentation_work _____________________________________________________________

tmpdir = local('/tmp/pytest-of-tkloczko/pytest-0/test_jupytext_commands_in_the_0')

    @requires_black
    @requires_myst
    @pytest.mark.skipif(
        not os.path.isdir(doc_path), reason="Documentation folder is missing"
    )
    def test_jupytext_commands_in_the_documentation_work(tmpdir):
        # Read the documentation as a bash notebook
        using_cli = os.path.join(doc_path, "using-cli.md")
        assert os.path.isfile(using_cli)
        using_cli_nb = jupytext.read(using_cli)

        # Run the commands in tmpdir on a sample notebook
        jupytext.write(
            new_notebook(cells=[new_code_cell("1+1")]), str(tmpdir.join("notebook.ipynb"))
        )
        os.chdir(str(tmpdir))

        cmd_tested = 0
        for cell in using_cli_nb.cells:
            if cell.cell_type != "code":
                continue
            if not cell.source.startswith("jupytext"):
                continue
            for cmd in cell.source.splitlines():
                if not cmd.startswith("jupytext"):
                    continue

                # Do not test commands that involve reading a notebook from stdin
                if "read ipynb from stdin" in cmd:
                    continue

                # We can't run pytest inside pytest
                if "pytest {}" in cmd:
                    continue

                # We need to remove the comments that may follow the jupytext command
                if "#" in cmd:
                    left, comment = cmd.rsplit("#", 1)
                    if '"' not in comment:
                        cmd = left

                print(f"Testing: {cmd}")
                args = shlex.split(cmd)[1:]
>               assert not jupytext_cli(args), cmd

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.7/tests/test_using_cli.py:58:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.7/jupytext/cli.py:488: in jupytext
    exit_code += jupytext_single_file(nb_file, args, log)
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.7/jupytext/cli.py:588: in jupytext_single_file
    kernelspec = kernelspec_from_language(language)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

language = 'python'

    def kernelspec_from_language(language):
        """Return the python kernel that matches the current env, or the first kernel that matches the given language"""
        if language == "python":
            # Return the kernel that matches the current Python executable
            for name in find_kernel_specs():
                kernel_specs = get_kernel_spec(name)
                cmd = kernel_specs.argv[0]
                if (
                    kernel_specs.language == "python"
                    and os.path.isfile(cmd)
                    and os.path.samefile(cmd, sys.executable)
                ):
                    return {
                        "name": name,
                        "language": language,
                        "display_name": kernel_specs.display_name,
                    }
>           raise ValueError(
                "No kernel found that matches the current python executable {}\n".format(
                    sys.executable
                )
                + "Install one with 'python -m ipykernel install --name kernel_name [--user]'"
            )
E           ValueError: No kernel found that matches the current python executable /usr/bin/python3
E           Install one with 'python -m ipykernel install --name kernel_name [--user]'

/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.7/jupytext/kernels.py:46: ValueError
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
Testing: jupytext --to py notebook.ipynb
[jupytext] Reading notebook.ipynb in format ipynb
[jupytext] Writing notebook.py
Testing: jupytext --to py:percent notebook.ipynb
[jupytext] Reading notebook.ipynb in format ipynb
[jupytext] Writing notebook.py in format py:percent (destination file replaced)
Testing: jupytext --to py:percent --opt comment_magics=false notebook.ipynb
[jupytext] Reading notebook.ipynb in format ipynb
[jupytext] Writing notebook.py in format py:percent (destination file replaced)
Testing: jupytext --to markdown notebook.ipynb
[jupytext] Reading notebook.ipynb in format ipynb
[jupytext] Writing notebook.md
Testing: jupytext --output script.py notebook.ipynb
[jupytext] Reading notebook.ipynb in format ipynb
[jupytext] Writing script.py
Testing: jupytext --to notebook notebook.py
[jupytext] Reading notebook.py in format py
[jupytext] Writing notebook.ipynb (destination file replaced [use --update to preserve cell outputs and ids])
Testing: jupytext --update --to notebook notebook.py
[jupytext] Reading notebook.py in format py
Testing: jupytext --to md --test notebook.ipynb
[jupytext] Reading notebook.ipynb in format ipynb
Testing: jupytext --to md --output - notebook.ipynb
---
jupyter:
  jupytext:
    comment_magics: false
    main_language: python
    text_representation:
      extension: .md
      format_name: markdown
      format_version: '1.3'
      jupytext_version: 1.13.7
---

```python
1+1

Testing: jupytext --set-formats ipynb,py notebook.ipynb
[jupytext] Reading notebook.ipynb in format ipynb
[jupytext] Updating notebook metadata with '{"jupytext": {"formats": "ipynb,py"}}'
[jupytext] Updating notebook.ipynb
[jupytext] Updating notebook.py
Testing: jupytext --sync notebook.ipynb
[jupytext] Reading notebook.ipynb in format ipynb
[jupytext] Loading notebook.py
[jupytext] Updating the timestamp of notebook.py
Testing: jupytext --set-kernel - notebook.md
[jupytext] Reading notebook.md in format md
============================================================================= warnings summary =============================================================================
jupytext/cell_reader.py:20
/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.7/jupytext/cell_reader.py:20: UserWarning: Sphinx Gallery in version 0.10.1 is not supported by Jupytext. Please use sphinx-gallery<=0.7.0 instead. If that is an issue, feel free to report it at https://github.com/mwouts/jupytext/issues, or even better, prepare a PR to handle the new signature of sphinx_gallery.notebook.rst2md.
warnings.warn(

tests/test_cli.py::test_format_prefix_suffix
[warning] You might have passed a file name to the '--to' option, when a format description was expected. Maybe you want to use the '-o' option instead?

tests/test_contentsmanager.py: 48 warnings
[warning] GObject.GError is deprecated; use GLib.GError instead

-- Docs: https://docs.pytest.org/en/stable/warnings.html
========================================================================= short test summary info ==========================================================================
SKIPPED [1] tests/test_auto_ext.py:36: No file_extension in language_info
SKIPPED [1] tests/test_black.py:68: autopep8 not found
SKIPPED [1] tests/test_black.py:79: flake8 not found
SKIPPED [1] tests/test_black.py:91: flake8 not found
SKIPPED [2] tests/test_cli.py:440: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [2] tests/test_cli.py:455: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [2] tests/test_cli.py:471: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [15] tests/test_cli.py:560: pandoc>=2.11 is not available
SKIPPED [1] tests/test_cli.py:677: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [1] tests/test_cli.py:692: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [1] tests/test_cli.py:810: sphinx_gallery is not available
SKIPPED [3] tests/test_cli.py:1010: pandoc>=2.11 is not available
SKIPPED [5] tests/test_cli.py:1024: pandoc>=2.11 is not available
SKIPPED [1] tests/test_cli.py:1095: pandoc>=2.11 is not available
SKIPPED [1] tests/test_cli.py:1235: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [17] tests/test_contentsmanager.py:179: pandoc>=2.11 is not available
SKIPPED [7] tests/test_contentsmanager.py:202: quarto>=0.2 is not available
SKIPPED [1] tests/test_contentsmanager.py:1288: sphinx_gallery is not available
SKIPPED [2] tests/test_contentsmanager.py:1865: jupyterfs is not available
SKIPPED [1] tests/test_execute.py:18: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [1] tests/test_execute.py:48: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [1] tests/test_execute.py:79: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [1] tests/test_execute.py:99: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [1] tests/test_execute.py:118: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [1] tests/test_execute.py:143: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [1] tests/test_execute.py:163: irkernel is not installed
SKIPPED [1] tests/test_execute.py:185: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [1] tests/test_formats.py:350: pandoc>=2.11 is not available
SKIPPED [1] tests/test_ipynb_to_myst.py:162: myst is available
SKIPPED [1] tests/test_ipynb_to_myst.py:171: myst is available
SKIPPED [1] tests/test_isort.py:8: isort not found
SKIPPED [17] tests/test_mirror.py:132: pandoc>=2.11 is not available
SKIPPED [7] tests/test_mirror.py:141: quarto>=0.2 is not available
SKIPPED [11] tests/test_mirror.py:168: sphinx_gallery is not available
SKIPPED [1] tests/test_mirror.py:219: sphinx_gallery is not available
SKIPPED [1] tests/test_mirror.py:225: sphinx_gallery is not available
SKIPPED [1] tests/test_pre_commit_0_ipynb_to_py.py:16: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_1_sync.py:17: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_1_sync_with_config.py:14: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_2_sync_nbstripout.py:14: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_3_sync_black_nbstripout.py:13: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_4_sync_execute.py:15: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_5_reformat_markdown.py:15: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_scripts.py:217: flake8 not found
SKIPPED [1] tests/test_pre_commit_scripts.py:334: pandoc>=2.11 is not available
SKIPPED [1] tests/test_read_empty_text_notebook.py:14: quarto is not available
SKIPPED [1] tests/test_read_simple_pandoc.py:12: pandoc>=2.11 is not available
SKIPPED [1] tests/test_read_simple_pandoc.py:34: pandoc>=2.11 is not available
SKIPPED [1] tests/test_read_simple_pandoc.py:49: pandoc>=2.11 is not available
SKIPPED [1] tests/test_read_simple_pandoc.py:63: pandoc>=2.11 is not available
SKIPPED [1] tests/test_read_simple_quarto.py:9: quarto>=0.2 is not available
XFAIL tests/test_auto_ext.py::test_auto_from_kernelspecs_works[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.7/tests/notebooks/ipynb_sage/sage_print_hello.ipynb]
reason: Sage notebooks have Python in their language_info metadata, see #727
FAILED tests/test_contentsmanager.py::test_python_kernel_preserves_R_files[/home/tkloczko/rpmbuild/BUILD/jupytext-1.13.7/tests/notebooks/R/simple_r_script.R] - ValueErro...
FAILED tests/test_execute.py::test_execute_text_file_does_update_the_metadata - ValueError: No kernel found that matches the current python executable /usr/bin/python3
FAILED tests/test_execute.py::test_cat_execute_does_not_update_the_metadata - ValueError: No kernel found that matches the current python executable /usr/bin/python3
FAILED tests/test_using_cli.py::test_jupytext_commands_in_the_documentation_work - ValueError: No kernel found that matches the current python executable /usr/bin/python3
============================================= 4 failed, 2597 passed, 129 skipped, 1 xfailed, 50 warnings in 121.55s (0:02:01) ==============================================

</details>

@mwouts
Copy link
Owner

mwouts commented Feb 10, 2022

looks like some progress has been made because now are failing only four units

Ha ha thank you @kloczek! And I see that three of them are tests that I just added in the latest release... I really need to add an entry on the CI that will test the package in the absence of a kernel.

@kloczek
Copy link
Author

kloczek commented Feb 10, 2022

So should I add ipkernel (?) to my build depenedencies or temporary hold such change? 😄

@mwouts
Copy link
Owner

mwouts commented Feb 10, 2022

So should I add ipkernel (?) to my build depenedencies or temporary hold such change? smile

Well you don't need to (I prefer to fix the test requirements and make sure we skip the tests that cannot succeed). But if you want to, that will increase the coverage. What you need to do is to make sure ipykernel is available and then create a kernel with e.g. this command:

run: python -m ipykernel install --name python_kernel --user

By the way I have integrated on main the dynamic skip for the four tests that were failing in the absence of a kernel, let me know if the RPM package passes with this change.

@kloczek
Copy link
Author

kloczek commented Dec 6, 2022

Looks like something has changes iin 1.14.2 and now pytest is failing in new way

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-jupytext-1.14.2-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-jupytext-1.14.2-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra --deselect tests/test_contentsmanager.py::test_python_kernel_preserves_R_files --deselect tests/test_execute.py::test_cat_execute_does_not_update_the_metadata --deselect tests/test_execute.py::test_execute_text_file_does_update_the_metadata --deselect tests/test_using_cli.py::test_jupytext_commands_in_the_documentation_work
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.15, pytest-7.2.0, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jupytext-1.14.2, configfile: pytest.ini
plugins: anyio-3.6.2, black-0.3.12
collected 2839 items / 4 deselected / 2835 selected

tests/test_active_cells.py ............................                                                                                                              [  0%]
tests/test_auto_ext.py .................................................................x.s........................                                                  [  4%]
tests/test_black.py ...sss.......                                                                                                                                    [  4%]
tests/test_cell_id.py .                                                                                                                                              [  4%]
tests/test_cell_markers.py ..                                                                                                                                        [  4%]
tests/test_cell_metadata.py ............................................................                                                                             [  6%]
tests/test_cells.py ................                                                                                                                                 [  7%]
tests/test_changelog.py ...                                                                                                                                          [  7%]
tests/test_cli.py ................................................^C
[tkloczko@pers-jacek SPECS]$

============================================================================= warnings summary =============================================================================
jupytext/cell_reader.py:20
  /home/tkloczko/rpmbuild/BUILD/jupytext-1.14.2/jupytext/cell_reader.py:20: UserWarning: Sphinx Gallery in version 0.11.1 is not supported by Jupytext. Please use sphinx-gallery<=0.7.0 instead. If that is an issue, feel free to report it at https://github.com/mwouts/jupytext/issues, or even better, prepare a PR to handle the new signature of sphinx_gallery.notebook.rst2md.
    warnings.warn(

../../../../../usr/lib/python3.8/site-packages/notebook/nbextensions.py:15
  /usr/lib/python3.8/site-packages/notebook/nbextensions.py:15: 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 (

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
========================================================================= short test summary info ==========================================================================
SKIPPED [1] tests/test_auto_ext.py:36: No file_extension in language_info
SKIPPED [1] tests/test_black.py:68: autopep8 not found
SKIPPED [1] tests/test_black.py:79: flake8 not found
SKIPPED [1] tests/test_black.py:91: flake8 not found
XFAIL tests/test_auto_ext.py::test_auto_from_kernelspecs_works[/home/tkloczko/rpmbuild/BUILD/jupytext-1.14.2/tests/notebooks/ipynb_sage/sage_print_hello.ipynb] - reason: Sage notebooks have Python in their language_info metadata, see #727
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! KeyboardInterrupt !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
/home/tkloczko/rpmbuild/BUILD/jupytext-1.14.2/jupytext/magics.py:118: KeyboardInterrupt
(to show a full traceback on KeyboardInterrupt use --full-trace)
=================================================== 258 passed, 4 skipped, 4 deselected, 1 xfailed, 2 warnings in 9.35s ====================================================

@mwouts
Copy link
Owner

mwouts commented Dec 6, 2022

Hello @kloczek, sorry about that! Just to confirm, is it the xfailed test that causes an issue? Would you prefer me to skip it?

@kloczek
Copy link
Author

kloczek commented Dec 7, 2022

I really have no idea what test suite is does so giving you advices wouls be not proper 😋

mwouts added a commit that referenced this issue Dec 11, 2022
mwouts added a commit that referenced this issue Dec 11, 2022
mwouts added a commit that referenced this issue Dec 11, 2022
mwouts added a commit that referenced this issue Dec 11, 2022
* Default to LargeFileManager when base class is async
* Python 3.6 is not found anymore on ubuntu-latest
* flake8 was moved to github
* Use skip rather than xfail #906
@mwouts
Copy link
Owner

mwouts commented Dec 11, 2022

Does jupytext==1.14.3 or jupytext==1.14.4 works better for you? Just in case I have replaced the xfailed with a skip. Cheers

@kloczek
Copy link
Author

kloczek commented Dec 12, 2022

Yes it is (+/- one waring)

============================================================================= warnings summary =============================================================================
jupytext/cell_reader.py:20
  /home/tkloczko/rpmbuild/BUILD/jupytext-1.14.4/jupytext/cell_reader.py:20: UserWarning: Sphinx Gallery in version 0.11.1 is not supported by Jupytext. Please use sphinx-gallery<=0.7.0 instead. If that is an issue, feel free to report it at https://github.com/mwouts/jupytext/issues, or even better, prepare a PR to handle the new signature of sphinx_gallery.notebook.rst2md.
    warnings.warn(

../../../../../usr/lib/python3.8/site-packages/notebook/nbextensions.py:15
  /usr/lib/python3.8/site-packages/notebook/nbextensions.py:15: 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 (

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
========================================================================= short test summary info ==========================================================================
SKIPPED [1] tests/test_auto_ext.py:43: Sage notebooks have Python in their language_info metadata, see #727
SKIPPED [1] tests/test_auto_ext.py:36: No file_extension in language_info
SKIPPED [1] tests/test_black.py:68: autopep8 not found
SKIPPED [1] tests/test_black.py:79: flake8 not found
SKIPPED [1] tests/test_black.py:91: flake8 not found
SKIPPED [2] tests/test_cli.py:439: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [2] tests/test_cli.py:454: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [2] tests/test_cli.py:470: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [15] tests/test_cli.py:559: pandoc>=2.11 is not available
SKIPPED [1] tests/test_cli.py:676: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [1] tests/test_cli.py:691: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [1] tests/test_cli.py:841: sphinx_gallery is not available
SKIPPED [1] tests/test_cli.py:1051: pandoc>=2.11 is not available
SKIPPED [5] tests/test_cli.py:1068: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [1] tests/test_cli.py:1139: pandoc>=2.11 is not available
SKIPPED [1] tests/test_cli.py:1259: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [17] tests/test_contentsmanager.py:180: pandoc>=2.11 is not available
SKIPPED [7] tests/test_contentsmanager.py:203: quarto>=0.2 is not available
SKIPPED [1] tests/test_contentsmanager.py:1219: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [1] tests/test_contentsmanager.py:1290: sphinx_gallery is not available
SKIPPED [2] tests/test_contentsmanager.py:1867: jupyterfs is not available
SKIPPED [1] tests/test_execute.py:18: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [1] tests/test_execute.py:48: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [1] tests/test_execute.py:79: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [1] tests/test_execute.py:99: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [1] tests/test_execute.py:118: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [1] tests/test_execute.py:143: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [1] tests/test_execute.py:163: irkernel is not installed
SKIPPED [1] tests/test_execute.py:185: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [1] tests/test_execute.py:266: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [1] tests/test_execute.py:278: Please run 'python -m ipykernel install --name python_kernel --user'
SKIPPED [1] tests/test_formats.py:350: pandoc>=2.11 is not available
SKIPPED [1] tests/test_ipynb_to_myst.py:162: myst is available
SKIPPED [1] tests/test_ipynb_to_myst.py:171: myst is available
SKIPPED [1] tests/test_isort.py:8: isort not found
SKIPPED [17] tests/test_mirror.py:132: pandoc>=2.11 is not available
SKIPPED [7] tests/test_mirror.py:141: quarto>=0.2 is not available
SKIPPED [11] tests/test_mirror.py:168: sphinx_gallery is not available
SKIPPED [1] tests/test_mirror.py:219: sphinx_gallery is not available
SKIPPED [1] tests/test_mirror.py:225: sphinx_gallery is not available
SKIPPED [1] tests/test_pre_commit_0_ipynb_to_py.py:16: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_1_sync.py:17: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_1_sync_with_config.py:14: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_1_sync_with_no_config.py:18: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_2_sync_nbstripout.py:14: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_3_sync_black_nbstripout.py:13: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_4_sync_execute.py:15: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_5_reformat_markdown.py:15: Jupytext folder is not a git repository #814
SKIPPED [1] tests/test_pre_commit_scripts.py:217: flake8 not found
SKIPPED [1] tests/test_pre_commit_scripts.py:334: pandoc>=2.11 is not available
SKIPPED [1] tests/test_read_empty_text_notebook.py:14: quarto is not available
SKIPPED [1] tests/test_read_simple_pandoc.py:12: pandoc>=2.11 is not available
SKIPPED [1] tests/test_read_simple_pandoc.py:34: pandoc>=2.11 is not available
SKIPPED [1] tests/test_read_simple_pandoc.py:49: pandoc>=2.11 is not available
SKIPPED [1] tests/test_read_simple_pandoc.py:63: pandoc>=2.11 is not available
SKIPPED [1] tests/test_read_simple_pandoc.py:81: Pandoc is installed
SKIPPED [1] tests/test_read_simple_quarto.py:9: quarto>=0.2 is not available
SKIPPED [1] tests/test_using_cli.py:15: Please run 'python -m ipykernel install --name python_kernel --user'
========================================================= 2716 passed, 134 skipped, 2 warnings in 88.27s (0:01:28) =========================================================

@kloczek
Copy link
Author

kloczek commented Dec 12, 2022

Feel free to close this ticket.

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