Source: lookatme
Version: 2.3.0-1
Severity: serious
Justification: FTBFS
Tags: bookworm sid ftbfs
User: [email protected]
Usertags: ftbfs-20211220 ftbfs-bookworm
Hi,
During a rebuild of all packages in sid, your package failed to build
on amd64.
Relevant part (hopefully):
> make[2]: Entering directory '/<<PKGBUILDDIR>>/docs'
> Running Sphinx v4.3.2
> making output directory... done
> Creating file /<<PKGBUILDDIR>>/docs/source/autodoc/lookatme.rst.
> Creating file /<<PKGBUILDDIR>>/docs/source/autodoc/lookatme.ascii_art.rst.
> Creating file /<<PKGBUILDDIR>>/docs/source/autodoc/lookatme.config.rst.
> Creating file /<<PKGBUILDDIR>>/docs/source/autodoc/lookatme.exceptions.rst.
> Creating file /<<PKGBUILDDIR>>/docs/source/autodoc/lookatme.log.rst.
> Creating file /<<PKGBUILDDIR>>/docs/source/autodoc/lookatme.parser.rst.
> Creating file /<<PKGBUILDDIR>>/docs/source/autodoc/lookatme.pres.rst.
> Creating file /<<PKGBUILDDIR>>/docs/source/autodoc/lookatme.prompt.rst.
> Creating file /<<PKGBUILDDIR>>/docs/source/autodoc/lookatme.schemas.rst.
> Creating file /<<PKGBUILDDIR>>/docs/source/autodoc/lookatme.slide.rst.
> Creating file /<<PKGBUILDDIR>>/docs/source/autodoc/lookatme.tui.rst.
> Creating file /<<PKGBUILDDIR>>/docs/source/autodoc/lookatme.utils.rst.
> Creating file /<<PKGBUILDDIR>>/docs/source/autodoc/lookatme.contrib.rst.
> Creating file
> /<<PKGBUILDDIR>>/docs/source/autodoc/lookatme.contrib.file_loader.rst.
> Creating file
> /<<PKGBUILDDIR>>/docs/source/autodoc/lookatme.contrib.terminal.rst.
> Creating file /<<PKGBUILDDIR>>/docs/source/autodoc/lookatme.render.rst.
> Creating file
> /<<PKGBUILDDIR>>/docs/source/autodoc/lookatme.render.asciinema.rst.
> Creating file
> /<<PKGBUILDDIR>>/docs/source/autodoc/lookatme.render.markdown_block.rst.
> Creating file
> /<<PKGBUILDDIR>>/docs/source/autodoc/lookatme.render.markdown_inline.rst.
> Creating file
> /<<PKGBUILDDIR>>/docs/source/autodoc/lookatme.render.pygments.rst.
> Creating file /<<PKGBUILDDIR>>/docs/source/autodoc/lookatme.themes.rst.
> Creating file /<<PKGBUILDDIR>>/docs/source/autodoc/lookatme.themes.dark.rst.
> Creating file /<<PKGBUILDDIR>>/docs/source/autodoc/lookatme.themes.light.rst.
> Creating file /<<PKGBUILDDIR>>/docs/source/autodoc/lookatme.widgets.rst.
> Creating file
> /<<PKGBUILDDIR>>/docs/source/autodoc/lookatme.widgets.clickable_text.rst.
> Creating file /<<PKGBUILDDIR>>/docs/source/autodoc/lookatme.widgets.table.rst.
> Creating file /<<PKGBUILDDIR>>/docs/source/autodoc/modules.rst.
> building [mo]: targets for 0 po files that are out of date
> building [html]: targets for 12 source files that are out of date
> updating environment: [new config] 39 added, 0 changed, 0 removed
> reading sources... [ 2%] autodoc/lookatme
> reading sources... [ 5%] autodoc/lookatme.ascii_art
> reading sources... [ 7%] autodoc/lookatme.config
> reading sources... [ 10%] autodoc/lookatme.contrib
> reading sources... [ 12%] autodoc/lookatme.contrib.file_loader
> reading sources... [ 15%] autodoc/lookatme.contrib.terminal
> reading sources... [ 17%] autodoc/lookatme.exceptions
> reading sources... [ 20%] autodoc/lookatme.log
> reading sources... [ 23%] autodoc/lookatme.parser
> reading sources... [ 25%] autodoc/lookatme.pres
> reading sources... [ 28%] autodoc/lookatme.prompt
> reading sources... [ 30%] autodoc/lookatme.render
> reading sources... [ 33%] autodoc/lookatme.render.asciinema
> reading sources... [ 35%] autodoc/lookatme.render.markdown_block
> reading sources... [ 38%] autodoc/lookatme.render.markdown_inline
> reading sources... [ 41%] autodoc/lookatme.render.pygments
> reading sources... [ 43%] autodoc/lookatme.schemas
> reading sources... [ 46%] autodoc/lookatme.slide
> reading sources... [ 48%] autodoc/lookatme.themes
> reading sources... [ 51%] autodoc/lookatme.themes.dark
> reading sources... [ 53%] autodoc/lookatme.themes.light
> reading sources... [ 56%] autodoc/lookatme.tui
> reading sources... [ 58%] autodoc/lookatme.utils
> reading sources... [ 61%] autodoc/lookatme.widgets
> reading sources... [ 64%] autodoc/lookatme.widgets.clickable_text
> reading sources... [ 66%] autodoc/lookatme.widgets.table
> reading sources... [ 69%] autodoc/modules
> reading sources... [ 71%] builtin_extensions/file_loader
> reading sources... [ 74%] builtin_extensions/index
> reading sources... [ 76%] builtin_extensions/terminal
> reading sources... [ 79%] contrib_extensions
> reading sources... [ 82%] contrib_extensions_auto
> reading sources... [ 84%] dark_theme
> reading sources... [ 87%] getting_started
> reading sources... [ 89%] index
> reading sources... [ 92%] light_theme
> reading sources... [ 94%] slides
> reading sources... [ 97%] smart_splitting
> reading sources... [100%] style_precendence
>
> /<<PKGBUILDDIR>>/docs/source/contrib_extensions_auto.rst:5: WARNING:
> duplicate label contrib-extensions, other instance in
> /<<PKGBUILDDIR>>/docs/source/contrib_extensions.rst
> looking for now-outdated files... none found
> pickling environment... done
> checking consistency... /<<PKGBUILDDIR>>/docs/source/contrib_extensions.rst:
> WARNING: document isn't included in any toctree
> done
> preparing documents... done
> writing output... [ 2%] autodoc/lookatme
> writing output... [ 5%] autodoc/lookatme.ascii_art
> writing output... [ 7%] autodoc/lookatme.config
> writing output... [ 10%] autodoc/lookatme.contrib
> writing output... [ 12%] autodoc/lookatme.contrib.file_loader
> writing output... [ 15%] autodoc/lookatme.contrib.terminal
> writing output... [ 17%] autodoc/lookatme.exceptions
> writing output... [ 20%] autodoc/lookatme.log
> writing output... [ 23%] autodoc/lookatme.parser
> writing output... [ 25%] autodoc/lookatme.pres
> writing output... [ 28%] autodoc/lookatme.prompt
> writing output... [ 30%] autodoc/lookatme.render
> writing output... [ 33%] autodoc/lookatme.render.asciinema
> writing output... [ 35%] autodoc/lookatme.render.markdown_block
> writing output... [ 38%] autodoc/lookatme.render.markdown_inline
> writing output... [ 41%] autodoc/lookatme.render.pygments
> writing output... [ 43%] autodoc/lookatme.schemas
> writing output... [ 46%] autodoc/lookatme.slide
> writing output... [ 48%] autodoc/lookatme.themes
> writing output... [ 51%] autodoc/lookatme.themes.dark
> writing output... [ 53%] autodoc/lookatme.themes.light
> writing output... [ 56%] autodoc/lookatme.tui
> writing output... [ 58%] autodoc/lookatme.utils
> writing output... [ 61%] autodoc/lookatme.widgets
> writing output... [ 64%] autodoc/lookatme.widgets.clickable_text
> writing output... [ 66%] autodoc/lookatme.widgets.table
> writing output... [ 69%] autodoc/modules
> writing output... [ 71%] builtin_extensions/file_loader
> writing output... [ 74%] builtin_extensions/index
> writing output... [ 76%] builtin_extensions/terminal
> writing output... [ 79%] contrib_extensions
> writing output... [ 82%] contrib_extensions_auto
> writing output... [ 84%] dark_theme
> writing output... [ 87%] getting_started
> writing output... [ 89%] index
> writing output... [ 92%] light_theme
> writing output... [ 94%] slides
> writing output... [ 97%] smart_splitting
> writing output... [100%] style_precendence
>
> generating indices... genindex py-modindex done
> highlighting module code... [ 5%] lookatme.contrib
> highlighting module code... [ 11%] lookatme.contrib.file_loader
> highlighting module code... [ 16%] lookatme.contrib.terminal
> highlighting module code... [ 22%] lookatme.exceptions
> highlighting module code... [ 27%] lookatme.log
> highlighting module code... [ 33%] lookatme.parser
> highlighting module code... [ 38%] lookatme.pres
> highlighting module code... [ 44%] lookatme.prompt
> highlighting module code... [ 50%] lookatme.render.markdown_block
> highlighting module code... [ 55%] lookatme.render.markdown_inline
> highlighting module code... [ 61%] lookatme.render.pygments
> highlighting module code... [ 66%] lookatme.schemas
> highlighting module code... [ 72%] lookatme.slide
> highlighting module code... [ 77%] lookatme.themes
> highlighting module code... [ 83%] lookatme.tui
> highlighting module code... [ 88%] lookatme.utils
> highlighting module code... [ 94%] lookatme.widgets.clickable_text
> highlighting module code... [100%] lookatme.widgets.table
>
> writing additional pages... search done
> copying images... [ 11%] _static/lookatme_dark1.png
> copying images... [ 22%] _static/lookatme_dark2.png
> copying images... [ 33%] _static/lookatme_dark3.png
> copying images... [ 44%] _static/lookatme_live_updates.gif
> copying images... [ 55%] _static/lookatme_tour.gif
> copying images... [ 66%] _static/lookatme_light1.png
> copying images... [ 77%] _static/lookatme_light2.png
> copying images... [ 88%] _static/lookatme_light3.png
> copying images... [100%] _static/lookatme_smart_splitting.gif
>
> copying static files... done
> copying extra files... done
> dumping search index in English (code: en)... done
> dumping object inventory... done
> build succeeded, 2 warnings.
>
> The HTML pages are in build/html.
> make[2]: Leaving directory '/<<PKGBUILDDIR>>/docs'
> make[1]: Leaving directory '/<<PKGBUILDDIR>>'
> dh_auto_test -O--buildsystem=pybuild
> I: pybuild base:237: cd
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_lookatme/build; python3.9 -m pytest
> tests
> ============================= test session starts
> ==============================
> platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.0
> rootdir: /<<PKGBUILDDIR>>
> plugins: mock-3.6.1
> collected 28 items
>
> tests/test_cli.py F.F [
> 10%]
> tests/test_contrib.py F [
> 14%]
> tests/test_file_loader.py FFFF [
> 28%]
> tests/test_markdown.py FFFFFFFFFFF [
> 67%]
> tests/test_parse.py ..FFF [
> 85%]
> tests/test_schemas.py . [
> 89%]
> tests/test_table.py FFF
> [100%]
>
> =================================== FAILURES
> ===================================
> ___________________________ test_dump_styles_unicode
> ___________________________
>
> def test_dump_styles_unicode():
> """Test that dump styles works correctly
> """
> res = run_cmd("--dump-styles")
> > assert res.exit_code == 0
> E assert 1 == 0
> E + where 1 = <Result TypeError("__init__() missing 1 required
> positional argument: 'renderer'")>.exit_code
>
> tests/test_cli.py:25: AssertionError
> _______________________________ test_exceptions
> ________________________________
>
> tmpdir = local('/tmp/pytest-of-user42/pytest-7/test_exceptions0')
> mocker = <pytest_mock.plugin.MockerFixture object at 0x7ff3fa8afe50>
>
> def test_exceptions(tmpdir, mocker):
> """Test exception handling on invalid inputs
> """
> log_path = tmpdir.join("log.txt")
> pres_path = tmpdir.join("test.md")
> with pres_path.open("w") as f:
> f.write("# Hello")
>
> slide_number = 3
> exception_text = "EXCEPTION TEXT"
>
> def fake_create_tui(*args, **kwargs):
> res = mocker.MagicMock()
> res.curr_slide.number = slide_number
> res.run.side_effect = Exception(exception_text)
> return res
> mocker.patch.object(lookatme.tui, "create_tui", fake_create_tui)
>
> res = run_cmd("--log", str(log_path), str(pres_path))
> > assert exception_text in res.output
> E assert 'EXCEPTION TEXT' in ''
> E + where '' = <Result TypeError("__init__() missing 1 required
> positional argument: 'renderer'")>.output
>
> tests/test_cli.py:56: AssertionError
> ____________________________ test_overridable_root
> _____________________________
>
> mocker = <pytest_mock.plugin.MockerFixture object at 0x7ff3fa854190>
>
> def test_overridable_root(mocker):
> """Ensure that the root urwid component is overridable
> """
> lookatme.config.LOG = mocker.Mock()
>
> class Wrapper(urwid.WidgetWrap): pass
>
> class FakeMod:
> @staticmethod
> def root_urwid_widget(to_wrap):
> return Wrapper(to_wrap)
>
> setup_contrib(FakeMod)
> input_stream = StringIO("test")
> > pres = lookatme.pres.Presentation(input_stream, "dark")
>
> tests/test_contrib.py:43:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> lookatme/pres.py:54: in __init__
> self.reload(data=input_stream.read())
> lookatme/pres.py:87: in reload
> self.meta, self.slides = parser.parse(data)
> lookatme/parser.py:33: in parse
> input_data, slides = self.parse_slides(meta, input_data)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <lookatme.parser.Parser object at 0x7ff3fac86cd0>
> meta = {'author': '', 'date': datetime.datetime(2021, 12, 20, 19, 4, 10,
> 102513), 'extensions': {}, 'styles': {}, ...}
> input_data = 'test'
>
> def parse_slides(self, meta, input_data):
> """Parse the Slide out of the input data
>
> :param dict meta: The parsed meta values
> :param str input_data: The input data string
> :returns: tuple of (remaining_data, slide)
> """
> # slides are delimited by ---
> > md = mistune.Markdown()
> E TypeError: __init__() missing 1 required positional argument:
> 'renderer'
>
> lookatme/parser.py:44: TypeError
> _______________________________ test_file_loader
> _______________________________
>
> tmpdir = local('/tmp/pytest-of-user42/pytest-7/test_file_loader0')
> mocker = <pytest_mock.plugin.MockerFixture object at 0x7ff3fa836b20>
>
> def test_file_loader(tmpdir, mocker):
> """Test the built-in file loader extension
> """
> mocker.patch.object(lookatme.config, "LOG")
> fake_config = mocker.patch.object(lookatme.render.markdown_block,
> "config")
> mocker.patch.object(lookatme.render.pygments, "config", fake_config)
> fake_config.STYLE = TEST_STYLE
>
> tmppath = tmpdir.join("test.py")
> tmppath.write("print('hello')")
>
> > rendered = render_markdown(f"""
> ```file
> path: {tmppath}
> relative: false
> ```
> """)
>
> tests/test_file_loader.py:38:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> tests/utils.py:34: in render_markdown
> _, slides = parser.parse_slides({"title": ""}, markdown)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <lookatme.parser.Parser object at 0x7ff3fa7f9f10>, meta = {'title': ''}
> input_data = '\n```file\npath:
> /tmp/pytest-of-user42/pytest-7/test_file_loader0/test.py\nrelative:
> false\n```\n '
>
> def parse_slides(self, meta, input_data):
> """Parse the Slide out of the input data
>
> :param dict meta: The parsed meta values
> :param str input_data: The input data string
> :returns: tuple of (remaining_data, slide)
> """
> # slides are delimited by ---
> > md = mistune.Markdown()
> E TypeError: __init__() missing 1 required positional argument:
> 'renderer'
>
> lookatme/parser.py:44: TypeError
> _______________________ test_file_loader_with_transform
> ________________________
>
> tmpdir =
> local('/tmp/pytest-of-user42/pytest-7/test_file_loader_with_transfor0')
> mocker = <pytest_mock.plugin.MockerFixture object at 0x7ff3fa7a1c40>
>
> def test_file_loader_with_transform(tmpdir, mocker):
> """Test the built-in file loader extension
> """
> mocker.patch.object(lookatme.config, "LOG")
> fake_config = mocker.patch.object(lookatme.render.markdown_block,
> "config")
> mocker.patch.object(lookatme.render.pygments, "config", fake_config)
> fake_config.STYLE = TEST_STYLE
>
> tmppath = tmpdir.join("test.py")
> tmppath.write("""
> Hello
> Apples2
> there
> Apples3
> there
> Apples1
> """)
>
> > rendered = render_markdown(f"""
> ```file
> path: {tmppath}
> relative: false
> transform: "grep -i apples | sort"
> ```
> """)
>
> tests/test_file_loader.py:73:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> tests/utils.py:34: in render_markdown
> _, slides = parser.parse_slides({"title": ""}, markdown)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <lookatme.parser.Parser object at 0x7ff3fa7acfd0>, meta = {'title': ''}
> input_data = '\n```file\npath:
> /tmp/pytest-of-user42/pytest-7/test_file_loader_with_transfor0/test.py\nrelative:
> false\ntransform: "grep -i apples | sort"\n```\n '
>
> def parse_slides(self, meta, input_data):
> """Parse the Slide out of the input data
>
> :param dict meta: The parsed meta values
> :param str input_data: The input data string
> :returns: tuple of (remaining_data, slide)
> """
> # slides are delimited by ---
> > md = mistune.Markdown()
> E TypeError: __init__() missing 1 required positional argument:
> 'renderer'
>
> lookatme/parser.py:44: TypeError
> __________________________ test_file_loader_relative
> ___________________________
>
> tmpdir = local('/tmp/pytest-of-user42/pytest-7/test_file_loader_relative0')
> mocker = <pytest_mock.plugin.MockerFixture object at 0x7ff3fa8b5790>
>
> def test_file_loader_relative(tmpdir, mocker):
> """Test the built-in file loader extension
> """
> mocker.patch.object(lookatme.config, "LOG")
> mocker.patch.object(lookatme.config, "SLIDE_SOURCE_DIR", str(tmpdir))
> fake_config = mocker.patch.object(lookatme.render.markdown_block,
> "config")
> mocker.patch.object(lookatme.render.pygments, "config", fake_config)
> fake_config.STYLE = TEST_STYLE
>
> tmppath = tmpdir.join("test.py")
> tmppath.write("print('hello')")
>
> > rendered = render_markdown(f"""
> ```file
> path: test.py
> relative: true
> ```
> """)
>
> tests/test_file_loader.py:105:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> tests/utils.py:34: in render_markdown
> _, slides = parser.parse_slides({"title": ""}, markdown)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <lookatme.parser.Parser object at 0x7ff3fa7b80a0>, meta = {'title': ''}
> input_data = '\n```file\npath: test.py\nrelative: true\n```\n '
>
> def parse_slides(self, meta, input_data):
> """Parse the Slide out of the input data
>
> :param dict meta: The parsed meta values
> :param str input_data: The input data string
> :returns: tuple of (remaining_data, slide)
> """
> # slides are delimited by ---
> > md = mistune.Markdown()
> E TypeError: __init__() missing 1 required positional argument:
> 'renderer'
>
> lookatme/parser.py:44: TypeError
> __________________________ test_file_loader_not_found
> __________________________
>
> mocker = <pytest_mock.plugin.MockerFixture object at 0x7ff3fa7a7490>
>
> def test_file_loader_not_found(mocker):
> """Test the built-in file loader extension
> """
> mocker.patch.object(lookatme.config, "LOG")
> fake_config = mocker.patch.object(lookatme.render.markdown_block,
> "config")
> mocker.patch.object(lookatme.render.pygments, "config", fake_config)
> fake_config.STYLE = TEST_STYLE
>
> > rendered = render_markdown(f"""
> ```file
> path: does_not_exist.py
> ```
> """)
>
> tests/test_file_loader.py:130:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> tests/utils.py:34: in render_markdown
> _, slides = parser.parse_slides({"title": ""}, markdown)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <lookatme.parser.Parser object at 0x7ff3f9f4ca60>, meta = {'title': ''}
> input_data = '\n```file\npath: does_not_exist.py\n```\n '
>
> def parse_slides(self, meta, input_data):
> """Parse the Slide out of the input data
>
> :param dict meta: The parsed meta values
> :param str input_data: The input data string
> :returns: tuple of (remaining_data, slide)
> """
> # slides are delimited by ---
> > md = mistune.Markdown()
> E TypeError: __init__() missing 1 required positional argument:
> 'renderer'
>
> lookatme/parser.py:44: TypeError
> ________________________________ test_headings
> _________________________________
>
> mocker = <pytest_mock.plugin.MockerFixture object at 0x7ff3f9f53490>
>
> def test_headings(mocker):
> """Test basic header rendering
> """
> mocker.patch.object(lookatme.config, "LOG")
> fake_config = mocker.patch.object(lookatme.render.markdown_block,
> "config")
> fake_config.STYLE = TEST_STYLE
>
> > rendered = render_markdown("""
> # H1
> ## H2
> ### H3
> ---
> """)
>
> tests/test_markdown.py:39:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> tests/utils.py:34: in render_markdown
> _, slides = parser.parse_slides({"title": ""}, markdown)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <lookatme.parser.Parser object at 0x7ff3f9f5c1f0>, meta = {'title': ''}
> input_data = '\n# H1\n## H2\n### H3\n---\n'
>
> def parse_slides(self, meta, input_data):
> """Parse the Slide out of the input data
>
> :param dict meta: The parsed meta values
> :param str input_data: The input data string
> :returns: tuple of (remaining_data, slide)
> """
> # slides are delimited by ---
> > md = mistune.Markdown()
> E TypeError: __init__() missing 1 required positional argument:
> 'renderer'
>
> lookatme/parser.py:44: TypeError
> __________________________________ test_table
> __________________________________
>
> mocker = <pytest_mock.plugin.MockerFixture object at 0x7ff3f8f08550>
>
> def test_table(mocker):
> """Test basic table rendering
> """
> import lookatme.widgets.table
>
> mocker.patch.object(lookatme.config, "LOG")
> fake_config = mocker.patch.object(lookatme.render.markdown_block,
> "config")
> mocker.patch.object(lookatme.widgets.table, "config", fake_config)
> fake_config.STYLE = {
> "table": {
> "column_spacing": 1,
> "header_divider": "-",
> },
> }
>
> > rendered = render_markdown("""
> | H1 | H2 | H3 |
> |:--------|:------:|-------:|
> | 1value1 | value2 | value3 |
> | 1 | 2 | 3 |
> """)
>
> tests/test_markdown.py:73:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> tests/utils.py:34: in render_markdown
> _, slides = parser.parse_slides({"title": ""}, markdown)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <lookatme.parser.Parser object at 0x7ff3f8f10d30>, meta = {'title': ''}
> input_data = '\n| H1 | H2 | H3
> |\n|:--------|:------:|-------:|\n| 1value1 | value2 | value3 |\n| 1 |
> 2 | 3 |\n'
>
> def parse_slides(self, meta, input_data):
> """Parse the Slide out of the input data
>
> :param dict meta: The parsed meta values
> :param str input_data: The input data string
> :returns: tuple of (remaining_data, slide)
> """
> # slides are delimited by ---
> > md = mistune.Markdown()
> E TypeError: __init__() missing 1 required positional argument:
> 'renderer'
>
> lookatme/parser.py:44: TypeError
> __________________________________ test_lists
> __________________________________
>
> mocker = <pytest_mock.plugin.MockerFixture object at 0x7ff3f9f5e730>
>
> def test_lists(mocker):
> """Test list rendering
> """
> import lookatme.widgets.table
>
> mocker.patch.object(lookatme.config, "LOG")
> fake_config = mocker.patch.object(lookatme.render.markdown_block,
> "config")
> mocker.patch.object(lookatme.widgets.table, "config", fake_config)
> fake_config.STYLE = {
> "bullets": {
> "default": "*",
> "1": "-",
> "2": "=",
> "3": "^",
> },
> }
>
> > rendered = render_markdown("""
> * list 1
> * list 2
> * list 3
> * list 4
> * list 2
> * list 3
> * list 3
>
> * list 2
> """)
>
> tests/test_markdown.py:106:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> tests/utils.py:34: in render_markdown
> _, slides = parser.parse_slides({"title": ""}, markdown)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <lookatme.parser.Parser object at 0x7ff3f8ef96d0>, meta = {'title': ''}
> input_data = '\n* list 1\n * list 2\n * list 3\n * list 4\n * list
> 2\n * list 3\n * list 3\n\n* list 2\n'
>
> def parse_slides(self, meta, input_data):
> """Parse the Slide out of the input data
>
> :param dict meta: The parsed meta values
> :param str input_data: The input data string
> :returns: tuple of (remaining_data, slide)
> """
> # slides are delimited by ---
> > md = mistune.Markdown()
> E TypeError: __init__() missing 1 required positional argument:
> 'renderer'
>
> lookatme/parser.py:44: TypeError
> ___________________________ test_lists_with_newline
> ____________________________
>
> mocker = <pytest_mock.plugin.MockerFixture object at 0x7ff3f86c7d30>
>
> def test_lists_with_newline(mocker):
> """Test list rendering with a newline between a new nested list and
> the
> previous list item
> """
> import lookatme.widgets.table
>
> mocker.patch.object(lookatme.config, "LOG")
> fake_config = mocker.patch.object(lookatme.render.markdown_block,
> "config")
> mocker.patch.object(lookatme.widgets.table, "config", fake_config)
> fake_config.STYLE = {
> "bullets": {
> "default": "*",
> "1": "-",
> "2": "=",
> "3": "^",
> },
> }
>
> > rendered = render_markdown("""
> * list 1
>
> * list 2
> """)
>
> tests/test_markdown.py:151:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> tests/utils.py:34: in render_markdown
> _, slides = parser.parse_slides({"title": ""}, markdown)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <lookatme.parser.Parser object at 0x7ff3f8f36370>, meta = {'title': ''}
> input_data = '\n* list 1\n\n * list 2\n'
>
> def parse_slides(self, meta, input_data):
> """Parse the Slide out of the input data
>
> :param dict meta: The parsed meta values
> :param str input_data: The input data string
> :returns: tuple of (remaining_data, slide)
> """
> # slides are delimited by ---
> > md = mistune.Markdown()
> E TypeError: __init__() missing 1 required positional argument:
> 'renderer'
>
> lookatme/parser.py:44: TypeError
> _____________________________ test_numbered_lists
> ______________________________
>
> mocker = <pytest_mock.plugin.MockerFixture object at 0x7ff3f8ef96d0>
>
> def test_numbered_lists(mocker):
> """Test list rendering
> """
> import lookatme.widgets.table
>
> mocker.patch.object(lookatme.config, "LOG")
> fake_config = mocker.patch.object(lookatme.render.markdown_block,
> "config")
> mocker.patch.object(lookatme.widgets.table, "config", fake_config)
> fake_config.STYLE = {
> "bullets": {
> "default": "*",
> "1": "-",
> "2": "=",
> "3": "^",
> },
> "numbering": {
> "default": "numeric",
> "1": "numeric",
> "2": "alpha",
> "3": "roman",
> },
> }
>
> > rendered = render_markdown("""
> 1. list 1
> 1. alpha1
> 1. alpha2
> 1. alpha3
> 1. list 2
> 1. alpha1.1
> 1. roman1
> 1. roman2
> 1. roman3
> 1. alpha1.2
> * test1
> * test2
> 1. list 3
> """)
>
> tests/test_markdown.py:189:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> tests/utils.py:34: in render_markdown
> _, slides = parser.parse_slides({"title": ""}, markdown)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <lookatme.parser.Parser object at 0x7ff3f8f0dd60>, meta = {'title': ''}
> input_data = '\n1. list 1\n 1. alpha1\n 1. alpha2\n 1. alpha3\n1.
> list 2\n 1. alpha1.1\n 1. roman1\n 1. roman2\n 1.
> roman3\n 1. alpha1.2\n * test1\n * test2\n1. list 3\n'
>
> def parse_slides(self, meta, input_data):
> """Parse the Slide out of the input data
>
> :param dict meta: The parsed meta values
> :param str input_data: The input data string
> :returns: tuple of (remaining_data, slide)
> """
> # slides are delimited by ---
> > md = mistune.Markdown()
> E TypeError: __init__() missing 1 required positional argument:
> 'renderer'
>
> lookatme/parser.py:44: TypeError
> __________________________________ test_hrule
> __________________________________
>
> mocker = <pytest_mock.plugin.MockerFixture object at 0x7ff3f86c3910>
>
> def test_hrule(mocker):
> """Test that hrules render correctly
> """
> mocker.patch.object(lookatme.config, "LOG")
> fake_config = mocker.patch.object(lookatme.render.markdown_block,
> "config")
> fake_config.STYLE = {
> "hrule": {
> "style": {
> "fg": "",
> "bg": "",
> },
> "char": "=",
> },
> }
>
> > rendered = render_markdown("---", width=10, single_slide=True)
>
> tests/test_markdown.py:240:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> tests/utils.py:34: in render_markdown
> _, slides = parser.parse_slides({"title": ""}, markdown)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <lookatme.parser.Parser object at 0x7ff3f86d0910>, meta = {'title': ''}
> input_data = '---'
>
> def parse_slides(self, meta, input_data):
> """Parse the Slide out of the input data
>
> :param dict meta: The parsed meta values
> :param str input_data: The input data string
> :returns: tuple of (remaining_data, slide)
> """
> # slides are delimited by ---
> > md = mistune.Markdown()
> E TypeError: __init__() missing 1 required positional argument:
> 'renderer'
>
> lookatme/parser.py:44: TypeError
> _______________________________ test_block_quote
> _______________________________
>
> mocker = <pytest_mock.plugin.MockerFixture object at 0x7ff3f8678eb0>
>
> def test_block_quote(mocker):
> """Test block quote rendering
> """
> mocker.patch.object(lookatme.config, "LOG")
> fake_config = mocker.patch.object(lookatme.render.markdown_block,
> "config")
> fake_config.STYLE = {
> "quote": {
> "style": {
> "fg": "",
> "bg": "",
> },
> "side": ">",
> "top_corner": "-",
> "bottom_corner": "=",
> },
> }
>
> > rendered = render_markdown("""
> > this is a quote
> """)
>
> tests/test_markdown.py:266:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> tests/utils.py:34: in render_markdown
> _, slides = parser.parse_slides({"title": ""}, markdown)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <lookatme.parser.Parser object at 0x7ff3f86eb5b0>, meta = {'title': ''}
> input_data = '\n> this is a quote\n'
>
> def parse_slides(self, meta, input_data):
> """Parse the Slide out of the input data
>
> :param dict meta: The parsed meta values
> :param str input_data: The input data string
> :returns: tuple of (remaining_data, slide)
> """
> # slides are delimited by ---
> > md = mistune.Markdown()
> E TypeError: __init__() missing 1 required positional argument:
> 'renderer'
>
> lookatme/parser.py:44: TypeError
> __________________________________ test_code
> ___________________________________
>
> mocker = <pytest_mock.plugin.MockerFixture object at 0x7ff3f86e7040>
>
> def test_code(mocker):
> """Test code block rendering
> """
> mocker.patch.object(lookatme.config, "LOG")
> fake_config = mocker.patch.object(lookatme.render.pygments, "config")
> fake_config.STYLE = {
> "style": "monokai",
> }
>
> > rendered = render_markdown("""
> ```python
> def some_fn(*args, **kargs):
> pass```
> """)
>
> tests/test_markdown.py:288:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> tests/utils.py:34: in render_markdown
> _, slides = parser.parse_slides({"title": ""}, markdown)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <lookatme.parser.Parser object at 0x7ff3f8694250>, meta = {'title': ''}
> input_data = '\n```python\ndef some_fn(*args, **kargs):\n pass```\n'
>
> def parse_slides(self, meta, input_data):
> """Parse the Slide out of the input data
>
> :param dict meta: The parsed meta values
> :param str input_data: The input data string
> :returns: tuple of (remaining_data, slide)
> """
> # slides are delimited by ---
> > md = mistune.Markdown()
> E TypeError: __init__() missing 1 required positional argument:
> 'renderer'
>
> lookatme/parser.py:44: TypeError
> _____________________________ test_empty_codeblock
> _____________________________
>
> mocker = <pytest_mock.plugin.MockerFixture object at 0x7ff3f8695b80>
>
> def test_empty_codeblock(mocker):
> """Test that empty code blocks render correctly
> """
> mocker.patch.object(lookatme.config, "LOG")
> fake_config = mocker.patch.object(lookatme.render.pygments, "config")
> fake_config.STYLE = {
> "style": "monokai",
> }
>
> > rendered = render_markdown("""
> ```python
>
> ```""")
>
> tests/test_markdown.py:312:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> tests/utils.py:34: in render_markdown
> _, slides = parser.parse_slides({"title": ""}, markdown)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <lookatme.parser.Parser object at 0x7ff3f8679c10>, meta = {'title': ''}
> input_data = '\n```python\n\n```'
>
> def parse_slides(self, meta, input_data):
> """Parse the Slide out of the input data
>
> :param dict meta: The parsed meta values
> :param str input_data: The input data string
> :returns: tuple of (remaining_data, slide)
> """
> # slides are delimited by ---
> > md = mistune.Markdown()
> E TypeError: __init__() missing 1 required positional argument:
> 'renderer'
>
> lookatme/parser.py:44: TypeError
> ________________________________ test_code_yaml
> ________________________________
>
> mocker = <pytest_mock.plugin.MockerFixture object at 0x7ff3f86950d0>
>
> def test_code_yaml(mocker):
> """Test code block rendering with yaml language
> """
> mocker.patch.object(lookatme.config, "LOG")
> fake_config = mocker.patch.object(lookatme.render.pygments, "config")
> fake_config.STYLE = {
> "style": "monokai",
> }
>
> > rendered = render_markdown("""
> ```yaml
> test: a value
> test2: "another value"
> array:
> - item1
> - item2
> - item3
> ```""")
>
> tests/test_markdown.py:327:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> tests/utils.py:34: in render_markdown
> _, slides = parser.parse_slides({"title": ""}, markdown)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <lookatme.parser.Parser object at 0x7ff3f86558e0>, meta = {'title': ''}
> input_data = '\n```yaml\ntest: a value\ntest2: "another value"\narray:\n -
> item1\n - item2\n - item3\n```'
>
> def parse_slides(self, meta, input_data):
> """Parse the Slide out of the input data
>
> :param dict meta: The parsed meta values
> :param str input_data: The input data string
> :returns: tuple of (remaining_data, slide)
> """
> # slides are delimited by ---
> > md = mistune.Markdown()
> E TypeError: __init__() missing 1 required positional argument:
> 'renderer'
>
> lookatme/parser.py:44: TypeError
> _________________________________ test_inline
> __________________________________
>
> mocker = <pytest_mock.plugin.MockerFixture object at 0x7ff3f8612d00>
>
> def test_inline(mocker):
> """Test inline markdown
> """
> mocker.patch.object(lookatme.config, "LOG")
> fake_config = mocker.patch.object(lookatme.render.pygments, "config")
> mocker.patch.object(lookatme.render.markdown_inline, "config",
> fake_config)
> fake_config.STYLE = {
> "style": "monokai",
> "link": {
> "fg": "underline",
> "bg": "default",
> },
> }
>
> > rendered = render_markdown("*emphasis*")
>
> tests/test_markdown.py:364:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> tests/utils.py:34: in render_markdown
> _, slides = parser.parse_slides({"title": ""}, markdown)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <lookatme.parser.Parser object at 0x7ff3f8670100>, meta = {'title': ''}
> input_data = '*emphasis*'
>
> def parse_slides(self, meta, input_data):
> """Parse the Slide out of the input data
>
> :param dict meta: The parsed meta values
> :param str input_data: The input data string
> :returns: tuple of (remaining_data, slide)
> """
> # slides are delimited by ---
> > md = mistune.Markdown()
> E TypeError: __init__() missing 1 required positional argument:
> 'renderer'
>
> lookatme/parser.py:44: TypeError
> ______________________________ test_parse_slides
> _______________________________
>
> def test_parse_slides():
> """Test that slide parsing works correctly
> """
> input_data = r"""
> # Slide 1
>
> * list
> * item
> * item
> * item
>
> Hello there this is a paragraph
>
> ```python
> code block
> ```
>
> ---
>
> # Slide 2
>
> More text
> """
> parser = Parser()
> > slides = parser.parse_slides({}, input_data)
>
> tests/test_parse.py:84:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <lookatme.parser.Parser object at 0x7ff3fa8ee670>, meta = {}
> input_data = '\n# Slide 1\n\n* list\n * item\n * item\n * item\n\nHello
> there this is a paragraph\n\n```python\ncode block\n```\n\n---\n\n# Slide
> 2\n\nMore text\n '
>
> def parse_slides(self, meta, input_data):
> """Parse the Slide out of the input data
>
> :param dict meta: The parsed meta values
> :param str input_data: The input data string
> :returns: tuple of (remaining_data, slide)
> """
> # slides are delimited by ---
> > md = mistune.Markdown()
> E TypeError: __init__() missing 1 required positional argument:
> 'renderer'
>
> lookatme/parser.py:44: TypeError
> ________________________ test_parse_smart_slides_one_h1
> ________________________
>
> def test_parse_smart_slides_one_h1():
> """Test that slide smart splitting works correctly
> """
> input_data = r"""
> # Heading Title
>
> ## Heading 2
>
> some text
>
> ## Heading 3
>
> more text
>
> ## Heading 4
>
> ### Sub heading
>
> #### Sub Heading
> """
> parser = Parser()
> meta = {"title": ""}
> > _, slides = parser.parse_slides(meta, input_data)
>
> tests/test_parse.py:110:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <lookatme.parser.Parser object at 0x7ff3f9f53040>, meta = {'title': ''}
> input_data = '\n# Heading Title\n\n## Heading 2\n\nsome text\n\n## Heading
> 3\n\nmore text\n\n## Heading 4\n\n### Sub heading\n\n#### Sub Heading\n '
>
> def parse_slides(self, meta, input_data):
> """Parse the Slide out of the input data
>
> :param dict meta: The parsed meta values
> :param str input_data: The input data string
> :returns: tuple of (remaining_data, slide)
> """
> # slides are delimited by ---
> > md = mistune.Markdown()
> E TypeError: __init__() missing 1 required positional argument:
> 'renderer'
>
> lookatme/parser.py:44: TypeError
> _____________________ test_parse_smart_slides_multiple_h2
> ______________________
>
> def test_parse_smart_slides_multiple_h2():
> """Test that slide smart splitting works correctly
> """
> input_data = r"""
> ## Heading 2
>
> some text
>
> ## Heading 3
>
> more text
>
> ## Heading 4
>
> ### Sub heading
>
> #### Sub Heading
> """
> parser = Parser()
> meta = {"title": ""}
> > _, slides = parser.parse_slides(meta, input_data)
>
> tests/test_parse.py:135:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <lookatme.parser.Parser object at 0x7ff3fa796700>, meta = {'title': ''}
> input_data = '\n## Heading 2\n\nsome text\n\n## Heading 3\n\nmore text\n\n##
> Heading 4\n\n### Sub heading\n\n#### Sub Heading\n '
>
> def parse_slides(self, meta, input_data):
> """Parse the Slide out of the input data
>
> :param dict meta: The parsed meta values
> :param str input_data: The input data string
> :returns: tuple of (remaining_data, slide)
> """
> # slides are delimited by ---
> > md = mistune.Markdown()
> E TypeError: __init__() missing 1 required positional argument:
> 'renderer'
>
> lookatme/parser.py:44: TypeError
> ______________________________ test_basic_render
> _______________________________
>
> mocker = <pytest_mock.plugin.MockerFixture object at 0x7ff3f8f20160>
>
> def test_basic_render(mocker):
> """Test that a Table widget renders correctly
> """
> column_spacing = 3
>
> fake_config = mocker.patch.object(lookatme.widgets.table, "config")
> fake_config.STYLE = {
> "style": "monokai",
> "table": {
> "column_spacing": column_spacing,
> "header_divider": "&",
> },
> }
>
> headers = ["H1", "H2", "H3"]
> aligns = ["left", "center", "right"]
> rows = [
> ["1", "22", "333"],
> ["*1*", "~~22~~", "**333**"],
> ]
>
> > table = lookatme.widgets.table.Table(rows, headers=headers,
> > aligns=aligns)
>
> tests/test_table.py:33:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> lookatme/widgets/table.py:46: in __init__
> self.rend_headers = self.create_cells(
> lookatme/widgets/table.py:156: in create_cells
> rend_cell_widgets = render_text(text=cell)
> lookatme/contrib/__init__.py:105: in inner
> return fn(*args, **kwargs)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> token = None, body = None, stack = None, loop = None, text = 'H1'
>
> @contrib_first
> def render_text(token=None, body=None, stack=None, loop=None, text=None):
> """Renders raw text. This function uses the inline markdown lexer
> from mistune with the :py:mod:`lookatme.render.markdown_inline`
> render module
> to render the lexed inline markup to a list composed of widgets or
> `urwid Text markup
> <http://urwid.org/manual/displayattributes.html#text-markup>`_.
> The created list of widgets/Text markup is then used to create and
> return
> a list composed entirely of widgets and :any:`ClickableText`
> instances.
>
> Many other functions call this function directly, passing in the extra
> ``text`` argument and leaving all other arguments blank.
>
> See :any:`lookatme.tui.SlideRenderer.do_render` for additional
> argument and
> return value descriptions.
> """
> if text is None:
> text = token["text"]
>
> > inline_lexer = mistune.InlineLexer(markdown_inline_renderer)
> E AttributeError: module 'mistune' has no attribute 'InlineLexer'
>
> lookatme/render/markdown_block.py:330: AttributeError
> ____________________________ test_table_no_headers
> _____________________________
>
> mocker = <pytest_mock.plugin.MockerFixture object at 0x7ff3f8645a60>
>
> def test_table_no_headers(mocker):
> """This situation could never happen as parsed from Markdown. See
> https://stackoverflow.com/a/17543474.
>
> However this situation could happen manually when using the Table()
> class
> directly.
> """
> fake_config = mocker.patch.object(lookatme.widgets.table, "config")
> fake_config.STYLE = {
> "style": "monokai",
> "table": {
> "column_spacing": 3,
> "header_divider": "&",
> },
> }
>
> headers = None
> aligns = ["left", "center", "right"]
> rows = [
> ["1", "22", "333"],
> ["*1*", "~~22~~", "**333**"],
> ]
>
> > table = lookatme.widgets.table.Table(rows, headers=headers,
> > aligns=aligns)
>
> tests/test_table.py:121:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> lookatme/widgets/table.py:51: in __init__
> self.rend_rows = self.create_cells(self.table_rows)
> lookatme/widgets/table.py:156: in create_cells
> rend_cell_widgets = render_text(text=cell)
> lookatme/contrib/__init__.py:105: in inner
> return fn(*args, **kwargs)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> token = None, body = None, stack = None, loop = None, text = '1'
>
> @contrib_first
> def render_text(token=None, body=None, stack=None, loop=None, text=None):
> """Renders raw text. This function uses the inline markdown lexer
> from mistune with the :py:mod:`lookatme.render.markdown_inline`
> render module
> to render the lexed inline markup to a list composed of widgets or
> `urwid Text markup
> <http://urwid.org/manual/displayattributes.html#text-markup>`_.
> The created list of widgets/Text markup is then used to create and
> return
> a list composed entirely of widgets and :any:`ClickableText`
> instances.
>
> Many other functions call this function directly, passing in the extra
> ``text`` argument and leaving all other arguments blank.
>
> See :any:`lookatme.tui.SlideRenderer.do_render` for additional
> argument and
> return value descriptions.
> """
> if text is None:
> text = token["text"]
>
> > inline_lexer = mistune.InlineLexer(markdown_inline_renderer)
> E AttributeError: module 'mistune' has no attribute 'InlineLexer'
>
> lookatme/render/markdown_block.py:330: AttributeError
> __________________________ test_ignored_extra_column
> ___________________________
>
> mocker = <pytest_mock.plugin.MockerFixture object at 0x7ff3f86695b0>
>
> def test_ignored_extra_column(mocker):
> """Test that extra columns beyond header values are ignored
> """
> fake_config = mocker.patch.object(lookatme.widgets.table, "config")
> fake_config.STYLE = {
> "style": "monokai",
> "table": {
> "column_spacing": 3,
> "header_divider": "&",
> },
> }
>
> headers = ["H1", "H2", "H3"]
> aligns = ["left", "center", "right"]
> rows = [
> ["1", "2", "3"],
> ["1", "2", "3", "4"],
> ["1", "2", "3", "4", "5"],
> ]
>
> > table = lookatme.widgets.table.Table(rows, headers=headers,
> > aligns=aligns)
>
> tests/test_table.py:148:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> lookatme/widgets/table.py:46: in __init__
> self.rend_headers = self.create_cells(
> lookatme/widgets/table.py:156: in create_cells
> rend_cell_widgets = render_text(text=cell)
> lookatme/contrib/__init__.py:105: in inner
> return fn(*args, **kwargs)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> token = None, body = None, stack = None, loop = None, text = 'H1'
>
> @contrib_first
> def render_text(token=None, body=None, stack=None, loop=None, text=None):
> """Renders raw text. This function uses the inline markdown lexer
> from mistune with the :py:mod:`lookatme.render.markdown_inline`
> render module
> to render the lexed inline markup to a list composed of widgets or
> `urwid Text markup
> <http://urwid.org/manual/displayattributes.html#text-markup>`_.
> The created list of widgets/Text markup is then used to create and
> return
> a list composed entirely of widgets and :any:`ClickableText`
> instances.
>
> Many other functions call this function directly, passing in the extra
> ``text`` argument and leaving all other arguments blank.
>
> See :any:`lookatme.tui.SlideRenderer.do_render` for additional
> argument and
> return value descriptions.
> """
> if text is None:
> text = token["text"]
>
> > inline_lexer = mistune.InlineLexer(markdown_inline_renderer)
> E AttributeError: module 'mistune' has no attribute 'InlineLexer'
>
> lookatme/render/markdown_block.py:330: AttributeError
> =============================== warnings summary
> ===============================
> ../../../../../../usr/lib/python3/dist-packages/marshmallow/fields.py:173: 59
> warnings
> /usr/lib/python3/dist-packages/marshmallow/fields.py:173:
> RemovedInMarshmallow4Warning: The 'default' argument to fields is deprecated.
> Use 'dump_default' instead.
> warnings.warn(
>
> ../../../../../../usr/lib/python3/dist-packages/marshmallow/fields.py:181: 16
> warnings
> /usr/lib/python3/dist-packages/marshmallow/fields.py:181:
> RemovedInMarshmallow4Warning: The 'missing' argument to fields is deprecated.
> Use 'load_default' instead.
> warnings.warn(
>
> -- Docs: https://docs.pytest.org/en/stable/warnings.html
> =========================== short test summary info
> ============================
> FAILED tests/test_cli.py::test_dump_styles_unicode - assert 1 == 0
> FAILED tests/test_cli.py::test_exceptions - assert 'EXCEPTION TEXT' in ''
> FAILED tests/test_contrib.py::test_overridable_root - TypeError: __init__()
> m...
> FAILED tests/test_file_loader.py::test_file_loader - TypeError: __init__()
> mi...
> FAILED tests/test_file_loader.py::test_file_loader_with_transform -
> TypeError...
> FAILED tests/test_file_loader.py::test_file_loader_relative - TypeError:
> __in...
> FAILED tests/test_file_loader.py::test_file_loader_not_found - TypeError:
> __i...
> FAILED tests/test_markdown.py::test_headings - TypeError: __init__() missing
> ...
> FAILED tests/test_markdown.py::test_table - TypeError: __init__() missing 1
> r...
> FAILED tests/test_markdown.py::test_lists - TypeError: __init__() missing 1
> r...
> FAILED tests/test_markdown.py::test_lists_with_newline - TypeError:
> __init__(...
> FAILED tests/test_markdown.py::test_numbered_lists - TypeError: __init__()
> mi...
> FAILED tests/test_markdown.py::test_hrule - TypeError: __init__() missing 1
> r...
> FAILED tests/test_markdown.py::test_block_quote - TypeError: __init__()
> missi...
> FAILED tests/test_markdown.py::test_code - TypeError: __init__() missing 1
> re...
> FAILED tests/test_markdown.py::test_empty_codeblock - TypeError: __init__()
> m...
> FAILED tests/test_markdown.py::test_code_yaml - TypeError: __init__()
> missing...
> FAILED tests/test_markdown.py::test_inline - TypeError: __init__() missing 1
> ...
> FAILED tests/test_parse.py::test_parse_slides - TypeError: __init__()
> missing...
> FAILED tests/test_parse.py::test_parse_smart_slides_one_h1 - TypeError:
> __ini...
> FAILED tests/test_parse.py::test_parse_smart_slides_multiple_h2 - TypeError:
> ...
> FAILED tests/test_table.py::test_basic_render - AttributeError: module
> 'mistu...
> FAILED tests/test_table.py::test_table_no_headers - AttributeError: module
> 'm...
> FAILED tests/test_table.py::test_ignored_extra_column - AttributeError:
> modul...
> ================== 24 failed, 4 passed, 75 warnings in 0.36s
> ===================
> E: pybuild pybuild:355: test: plugin distutils failed with: exit code=1: cd
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_lookatme/build; python3.9 -m pytest
> tests
> dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p 3.9
> returned exit code 13
The full build log is available from:
http://qa-logs.debian.net/2021/12/20/lookatme_2.3.0-1_unstable.log
A list of current common problems and possible solutions is available at
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!
If you reassign this bug to another package, please marking it as 'affects'-ing
this package. See https://www.debian.org/Bugs/server-control#affects
If you fail to reproduce this, please provide a build log and diff it with mine
so that we can identify if something relevant changed in the meantime.