#6 Fix FTBFS
Merged 3 years ago by nonamedotc. Opened 3 years ago by churchyard.
rpms/ churchyard/python-nbconvert ipywidgets  into  master

file modified
+4 -2
@@ -36,8 +36,10 @@ 

  BuildRequires:  python3-entrypoints

  BuildRequires:  python3-defusedxml

  BuildRequires:  python3-ipykernel

+ #BuildRequires:  python3-ipywidgets -- not yet packaged

  BuildRequires:  python3-jinja2

  BuildRequires:  python3-jupyter_core

+ BuildRequires:  python3-mock

  BuildRequires:  python3-mistune

  BuildRequires:  python3-nbformat

  BuildRequires:  python3-nose
@@ -98,8 +100,8 @@ 

  # test_markdown2rst - our pandoc is too new

  # test_minimal_version - our pandoc is too new

  # test_pandoc_available - our pandoc is too new

- # test_run_notebooks - slightly different output, probably a jupyter version mismatch

- %{__python3} -m pytest -v -k "not test_markdown2rst and not test_minimal_version and not test_pandoc_available and not test_run_notebooks"

+ # test_run_notebooks, test_widgets - needs ipywidgets

+ %{__python3} -m pytest -v -k "not test_markdown2rst and not test_minimal_version and not test_pandoc_available and not test_run_notebooks and not test_widgets"

  %endif

  

  %files -n python3-%{pypi_name}

no initial comment

Running a 3.8 copr build as well.

Got this on Python 3.8:

=================================== FAILURES ===================================
______________________ TestNbConvertApp.test_allow_errors ______________________

self = <nbconvert.tests.test_nbconvertapp.TestNbConvertApp testMethod=test_allow_errors>

    def test_allow_errors(self):
        """
        Verify that conversion is aborted with '--execute' if an error is
        encountered, but that conversion continues if '--allow-errors' is
        used in addition.
        """
        with self.create_temp_cwd(['notebook3*.ipynb']):
            # Convert notebook containing a cell that raises an error,
            # both without and with cell execution enabled.
            output1, _ = self.nbconvert('--to markdown --stdout notebook3*.ipynb')  # no cell execution
            output2, _ = self.nbconvert('--to markdown --allow-errors --stdout notebook3*.ipynb')  # no cell execution; --allow-errors should have no effect
            output3, _ = self.nbconvert('--execute --allow-errors --to markdown --stdout notebook3*.ipynb')  # with cell execution; errors are allowed

            # Un-executed outputs should not contain either
            # of the two numbers computed in the notebook.
            assert '23' not in output1
            assert '42' not in output1
            assert '23' not in output2
            assert '42' not in output2

            # Executed output should contain both numbers.
            assert '23' in output3
>           assert '42' in output3
E           AssertionError: assert '42' in '\n# Notebook with errors\n\nThis notebook contains a cell which deliberately throws an exception. This is to test if ...n\n```python\nprint("The answer to the question about life, the universe and everything is: {}".format(43 - 1))\n```\n'

nbconvert/tests/test_nbconvertapp.py:382: AssertionError
=============================== warnings summary ===============================

But not in my mock, only in Copr. Maybe the test is flaky. Feel free to merge as is.

Second copr build passed \o/

Pull-Request has been merged by nonamedotc

3 years ago