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
running pytest #167
Comments
Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗 |
Heya, it's because you are running with package version that are out of sync with those in the testing extra of https://github.com/executablebooks/markdown-it-py/blob/master/setup.cfg |
Humble quesion: can you point which one are out of sync?🤔 |
You have pytest-6.2.4 and the requirement is pytest>=3.6,<4 |
And at the moment it is not possible to have installed both versions because almost everything is using latest version. |
Certainly happy to receive a PR to update the test dependency versions. |
pytest as you know has a lot extensions and that output is from such env where I have installed almost 500 installed modules. In other words don't take that ticked as actual bug report. I think that that comment may explain more about intention of oippening that ticket and from that point of view I would be really appreciated for any comment/expetrtise. |
Below is updated pytest log after add to build env few used modules. + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-markdown-it-py-1.1.0~no_loopy_deps-3.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-markdown-it-py-1.1.0~no_loopy_deps-3.fc35.x86_64/usr/lib/python3.8/site-packages
+ PYTHONDONTWRITEBYTECODE=1
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.9, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
benchmark: 3.4.1 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
Using --randomly-seed=1765588921
rootdir: /home/tkloczko/rpmbuild/BUILD/markdown-it-py-1.1.0
plugins: forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, expect-1.1.0, httpbin-1.0.0, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, freezegun-0.4.2, case-1.5.3, isort-1.3.0, aspectlib-1.5.2, asyncio-0.15.1, toolbox-0.5, xprocess-0.17.1, aiohttp-0.3.0, checkdocs-2.7.0, mock-3.6.1, rerunfailures-9.1.1, requests-mock-1.9.3, cov-2.12.1, pyfakefs-4.5.0, cases-3.6.1, flaky-3.7.0, hypothesis-6.14.0, benchmark-3.4.1, xdist-2.3.0, pylama-7.7.1, randomly-3.8.0, Faker-8.8.2
collected 863 items
tests/test_cli.py .. [ 0%]
. . [ 0%]
tests/test_cli.py .. [ 0%]
tests/test_port/test_misc.py . [ 0%]
tests/test_api/test_main.py ......E.... [ 1%]
tests/test_linkify.py F [ 2%]
tests/test_api/test_token.py ... [ 2%]
tests/test_api/test_plugin_creation.py ......... [ 3%]
tests/test_port/test_fixtures.py .........F...............................F.....x.....x...........F.......x..............x........F.......F............x..FF....FF.. [ 18%]
..F.......F................... [ 22%]
tests/test_port/test_references.py EE. [ 22%]
tests/test_tree.py E..... [ 23%]
tests/test_cmark_spec/test_spec.py ................................................................................................................................. [ 38%]
..............................................E..................................................................................................................... [ 57%]
.................................................................................................................................................................... [ 76%]
.................................................................................................................................................................... [ 95%]
............................. [ 98%]
tests/test_port/test_no_end_newline.py ........... [100%]
================================================================================== ERRORS ==================================================================================
___________________________________________________________________ ERROR at setup of test_table_tokens ____________________________________________________________________
file /home/tkloczko/rpmbuild/BUILD/markdown-it-py-1.1.0/tests/test_api/test_main.py, line 269
def test_table_tokens(data_regression):
E fixture 'data_regression' not found
> available fixtures: _session_faker, aiohttp_client, aiohttp_raw_server, aiohttp_server, aiohttp_unused_port, benchmark, benchmark_weave, betamax_parametrized_recorder, betamax_parametrized_session, betamax_recorder, betamax_session, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, class_based_httpbin, class_based_httpbin_secure, class_mocker, cov, current_cases, doctest_namespace, event_loop, faker, faker_seed, fast, freezer, fs, httpbin, httpbin_both, httpbin_ca_bundle, httpbin_secure, loop, loop_debug, mocker, module_mocker, monkeypatch, no_cover, package_mocker, patching, proactor_loop, pytestconfig, raw_test_server, record_property, record_testsuite_property, record_xml_attribute, recwarn, requests_mock, session_mocker, smart_caplog, stdouts, test_client, test_server, testrun_uid, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, tmpworkdir, unused_port, unused_tcp_port, unused_tcp_port_factory, virtualenv, weave, worker_id, workspace, xprocess
> use 'pytest --fixtures [testpath]' for help on them.
/home/tkloczko/rpmbuild/BUILD/markdown-it-py-1.1.0/tests/test_api/test_main.py:269
___________________________________________________________________ ERROR at setup of test_store_labels ____________________________________________________________________
file /home/tkloczko/rpmbuild/BUILD/markdown-it-py-1.1.0/tests/test_port/test_references.py, line 40
def test_store_labels(data_regression):
E fixture 'data_regression' not found
> available fixtures: _session_faker, aiohttp_client, aiohttp_raw_server, aiohttp_server, aiohttp_unused_port, benchmark, benchmark_weave, betamax_parametrized_recorder, betamax_parametrized_session, betamax_recorder, betamax_session, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, class_based_httpbin, class_based_httpbin_secure, class_mocker, cov, current_cases, doctest_namespace, event_loop, faker, faker_seed, fast, freezer, fs, httpbin, httpbin_both, httpbin_ca_bundle, httpbin_secure, loop, loop_debug, mocker, module_mocker, monkeypatch, no_cover, package_mocker, patching, proactor_loop, pytestconfig, raw_test_server, record_property, record_testsuite_property, record_xml_attribute, recwarn, requests_mock, session_mocker, smart_caplog, stdouts, test_client, test_server, testrun_uid, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, tmpworkdir, unused_port, unused_tcp_port, unused_tcp_port_factory, virtualenv, weave, worker_id, workspace, xprocess
> use 'pytest --fixtures [testpath]' for help on them.
/home/tkloczko/rpmbuild/BUILD/markdown-it-py-1.1.0/tests/test_port/test_references.py:40
_________________________________________________________________ ERROR at setup of test_use_existing_env __________________________________________________________________
file /home/tkloczko/rpmbuild/BUILD/markdown-it-py-1.1.0/tests/test_port/test_references.py, line 20
def test_use_existing_env(data_regression):
E fixture 'data_regression' not found
> available fixtures: _session_faker, aiohttp_client, aiohttp_raw_server, aiohttp_server, aiohttp_unused_port, benchmark, benchmark_weave, betamax_parametrized_recorder, betamax_parametrized_session, betamax_recorder, betamax_session, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, class_based_httpbin, class_based_httpbin_secure, class_mocker, cov, current_cases, doctest_namespace, event_loop, faker, faker_seed, fast, freezer, fs, httpbin, httpbin_both, httpbin_ca_bundle, httpbin_secure, loop, loop_debug, mocker, module_mocker, monkeypatch, no_cover, package_mocker, patching, proactor_loop, pytestconfig, raw_test_server, record_property, record_testsuite_property, record_xml_attribute, recwarn, requests_mock, session_mocker, smart_caplog, stdouts, test_client, test_server, testrun_uid, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, tmpworkdir, unused_port, unused_tcp_port, unused_tcp_port_factory, virtualenv, weave, worker_id, workspace, xprocess
> use 'pytest --fixtures [testpath]' for help on them.
/home/tkloczko/rpmbuild/BUILD/markdown-it-py-1.1.0/tests/test_port/test_references.py:20
______________________________________________________________________ ERROR at setup of test_pretty _______________________________________________________________________
file /home/tkloczko/rpmbuild/BUILD/markdown-it-py-1.1.0/tests/test_tree.py, line 60
def test_pretty(file_regression):
E fixture 'file_regression' not found
> available fixtures: _session_faker, aiohttp_client, aiohttp_raw_server, aiohttp_server, aiohttp_unused_port, benchmark, benchmark_weave, betamax_parametrized_recorder, betamax_parametrized_session, betamax_recorder, betamax_session, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, class_based_httpbin, class_based_httpbin_secure, class_mocker, cov, current_cases, doctest_namespace, event_loop, faker, faker_seed, fast, freezer, fs, httpbin, httpbin_both, httpbin_ca_bundle, httpbin_secure, loop, loop_debug, mocker, module_mocker, monkeypatch, no_cover, package_mocker, patching, proactor_loop, pytestconfig, raw_test_server, record_property, record_testsuite_property, record_xml_attribute, recwarn, requests_mock, session_mocker, smart_caplog, stdouts, test_client, test_server, testrun_uid, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, tmpworkdir, unused_port, unused_tcp_port, unused_tcp_port_factory, virtualenv, weave, worker_id, workspace, xprocess
> use 'pytest --fixtures [testpath]' for help on them.
/home/tkloczko/rpmbuild/BUILD/markdown-it-py-1.1.0/tests/test_tree.py:60
_______________________________________________________________________ ERROR at setup of test_file ________________________________________________________________________
file /home/tkloczko/rpmbuild/BUILD/markdown-it-py-1.1.0/tests/test_cmark_spec/test_spec.py, line 15
def test_file(file_regression):
E fixture 'file_regression' not found
> available fixtures: _session_faker, aiohttp_client, aiohttp_raw_server, aiohttp_server, aiohttp_unused_port, benchmark, benchmark_weave, betamax_parametrized_recorder, betamax_parametrized_session, betamax_recorder, betamax_session, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, class_based_httpbin, class_based_httpbin_secure, class_mocker, cov, current_cases, doctest_namespace, event_loop, faker, faker_seed, fast, freezer, fs, httpbin, httpbin_both, httpbin_ca_bundle, httpbin_secure, loop, loop_debug, mocker, module_mocker, monkeypatch, no_cover, package_mocker, patching, proactor_loop, pytestconfig, raw_test_server, record_property, record_testsuite_property, record_xml_attribute, recwarn, requests_mock, session_mocker, smart_caplog, stdouts, test_client, test_server, testrun_uid, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, tmpworkdir, unused_port, unused_tcp_port, unused_tcp_port_factory, virtualenv, weave, worker_id, workspace, xprocess
> use 'pytest --fixtures [testpath]' for help on them.
/home/tkloczko/rpmbuild/BUILD/markdown-it-py-1.1.0/tests/test_cmark_spec/test_spec.py:15
================================================================================= FAILURES =================================================================================
____________________________________________________________________________ test_token_levels _____________________________________________________________________________
def test_token_levels():
mdit = MarkdownIt(options_update={"linkify": True}).enable("linkify")
> tokens = mdit.parse("www.python.org")
tests/test_linkify.py:6:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
markdown_it/main.py:260: in parse
self.core.process(state)
markdown_it/parser_core.py:33: in process
rule(state)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
state = <markdown_it.rules_core.state_core.StateCore object at 0x7f5a2d1b7b20>
def linkify(state: StateCore) -> None:
blockTokens = state.tokens
if not state.md.options.linkify:
return
if not state.md.linkify:
> raise ModuleNotFoundError("Linkify enabled but not installed.")
E ModuleNotFoundError: Linkify enabled but not installed.
markdown_it/rules_core/linkify.py:31: ModuleNotFoundError
_____________ test_linkify[52-typorgapher should not break href-http://example.com/(c)\n-<p><a href="http://example.com/(c)">http://example.com/(c)</a></p>\n] _____________
line = 52, title = 'typorgapher should not break href', input = 'http://example.com/(c)\n'
expected = '<p><a href="http://example.com/(c)">http://example.com/(c)</a></p>\n'
@pytest.mark.parametrize(
"line,title,input,expected",
read_fixture_file(FIXTURE_PATH.joinpath("linkify.md")),
)
def test_linkify(line, title, input, expected):
md = MarkdownIt().enable("linkify")
md.options["linkify"] = True
> text = md.render(input)
tests/test_port/test_fixtures.py:18:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
markdown_it/main.py:275: in render
return self.renderer.render(self.parse(src, env), self.options, env)
markdown_it/main.py:260: in parse
self.core.process(state)
markdown_it/parser_core.py:33: in process
rule(state)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
state = <markdown_it.rules_core.state_core.StateCore object at 0x7f5a2d1ed6a0>
def linkify(state: StateCore) -> None:
blockTokens = state.tokens
if not state.md.options.linkify:
return
if not state.md.linkify:
> raise ModuleNotFoundError("Linkify enabled but not installed.")
E ModuleNotFoundError: Linkify enabled but not installed.
markdown_it/rules_core/linkify.py:31: ModuleNotFoundError
_ test_linkify[41-emails-test@example.com\n\nmailto:test@example.com\n-<p><a href="mailto:test@example.com">test@example.com</a></p>\n<p><a href="mailto:test@example.com">mailto:test@example.com</a></p>\n] _
line = 41, title = 'emails', input = 'test@example.com\n\nmailto:test@example.com\n'
expected = '<p><a href="mailto:test@example.com">test@example.com</a></p>\n<p><a href="mailto:test@example.com">mailto:test@example.com</a></p>\n'
@pytest.mark.parametrize(
"line,title,input,expected",
read_fixture_file(FIXTURE_PATH.joinpath("linkify.md")),
)
def test_linkify(line, title, input, expected):
md = MarkdownIt().enable("linkify")
md.options["linkify"] = True
> text = md.render(input)
tests/test_port/test_fixtures.py:18:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
markdown_it/main.py:275: in render
return self.renderer.render(self.parse(src, env), self.options, env)
markdown_it/main.py:260: in parse
self.core.process(state)
markdown_it/parser_core.py:33: in process
rule(state)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
state = <markdown_it.rules_core.state_core.StateCore object at 0x7f5a2ce46850>
def linkify(state: StateCore) -> None:
blockTokens = state.tokens
if not state.md.options.linkify:
return
if not state.md.linkify:
> raise ModuleNotFoundError("Linkify enabled but not installed.")
E ModuleNotFoundError: Linkify enabled but not installed.
markdown_it/rules_core/linkify.py:31: ModuleNotFoundError
_ test_linkify[1-linkify-url http://www.youtube.com/watch?v=5Jt5GEr4AYg.\n-<p>url <a href="http://www.youtube.com/watch?v=5Jt5GEr4AYg">http://www.youtube.com/watch?v=5Jt5GEr4AYg</a>.</p>\n] _
line = 1, title = 'linkify', input = 'url http://www.youtube.com/watch?v=5Jt5GEr4AYg.\n'
expected = '<p>url <a href="http://www.youtube.com/watch?v=5Jt5GEr4AYg">http://www.youtube.com/watch?v=5Jt5GEr4AYg</a>.</p>\n'
@pytest.mark.parametrize(
"line,title,input,expected",
read_fixture_file(FIXTURE_PATH.joinpath("linkify.md")),
)
def test_linkify(line, title, input, expected):
md = MarkdownIt().enable("linkify")
md.options["linkify"] = True
> text = md.render(input)
tests/test_port/test_fixtures.py:18:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
markdown_it/main.py:275: in render
return self.renderer.render(self.parse(src, env), self.options, env)
markdown_it/main.py:260: in parse
self.core.process(state)
markdown_it/parser_core.py:33: in process
rule(state)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
state = <markdown_it.rules_core.state_core.StateCore object at 0x7f5a2d20a7c0>
def linkify(state: StateCore) -> None:
blockTokens = state.tokens
if not state.md.options.linkify:
return
if not state.md.linkify:
> raise ModuleNotFoundError("Linkify enabled but not installed.")
E ModuleNotFoundError: Linkify enabled but not installed.
markdown_it/rules_core/linkify.py:31: ModuleNotFoundError
___ test_linkify[88-before after lines with blank line-before\n\ngithub.com\n\nafter\n-<p>before</p>\n<p><a href="http://github.com">github.com</a></p>\n<p>after</p>\n] ___
line = 88, title = 'before after lines with blank line', input = 'before\n\ngithub.com\n\nafter\n'
expected = '<p>before</p>\n<p><a href="http://github.com">github.com</a></p>\n<p>after</p>\n'
@pytest.mark.parametrize(
"line,title,input,expected",
read_fixture_file(FIXTURE_PATH.joinpath("linkify.md")),
)
def test_linkify(line, title, input, expected):
md = MarkdownIt().enable("linkify")
md.options["linkify"] = True
> text = md.render(input)
tests/test_port/test_fixtures.py:18:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
markdown_it/main.py:275: in render
return self.renderer.render(self.parse(src, env), self.options, env)
markdown_it/main.py:260: in parse
self.core.process(state)
markdown_it/parser_core.py:33: in process
rule(state)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
state = <markdown_it.rules_core.state_core.StateCore object at 0x7f5a2cebf3a0>
def linkify(state: StateCore) -> None:
blockTokens = state.tokens
if not state.md.options.linkify:
return
if not state.md.linkify:
> raise ModuleNotFoundError("Linkify enabled but not installed.")
E ModuleNotFoundError: Linkify enabled but not installed.
markdown_it/rules_core/linkify.py:31: ModuleNotFoundError
__________________ test_linkify[17-don't touch text in autolinks-<https://example.com>\n-<p><a href="https://example.com">https://example.com</a></p>\n] ___________________
line = 17, title = "don't touch text in autolinks", input = '<https://example.com>\n', expected = '<p><a href="https://example.com">https://example.com</a></p>\n'
@pytest.mark.parametrize(
"line,title,input,expected",
read_fixture_file(FIXTURE_PATH.joinpath("linkify.md")),
)
def test_linkify(line, title, input, expected):
md = MarkdownIt().enable("linkify")
md.options["linkify"] = True
> text = md.render(input)
tests/test_port/test_fixtures.py:18:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
markdown_it/main.py:275: in render
return self.renderer.render(self.parse(src, env), self.options, env)
markdown_it/main.py:260: in parse
self.core.process(state)
markdown_it/parser_core.py:33: in process
rule(state)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
state = <markdown_it.rules_core.state_core.StateCore object at 0x7f5a2cc7a820>
def linkify(state: StateCore) -> None:
blockTokens = state.tokens
if not state.md.options.linkify:
return
if not state.md.linkify:
> raise ModuleNotFoundError("Linkify enabled but not installed.")
E ModuleNotFoundError: Linkify enabled but not installed.
markdown_it/rules_core/linkify.py:31: ModuleNotFoundError
_ test_linkify[25-don't touch text in html <a> tags-<a href="https://example.com">https://example.com</a>\n-<p><a href="https://example.com">https://example.com</a></p>\n] _
line = 25, title = "don't touch text in html <a> tags", input = '<a href="https://example.com">https://example.com</a>\n'
expected = '<p><a href="https://example.com">https://example.com</a></p>\n'
@pytest.mark.parametrize(
"line,title,input,expected",
read_fixture_file(FIXTURE_PATH.joinpath("linkify.md")),
)
def test_linkify(line, title, input, expected):
md = MarkdownIt().enable("linkify")
md.options["linkify"] = True
> text = md.render(input)
tests/test_port/test_fixtures.py:18:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
markdown_it/main.py:275: in render
return self.renderer.render(self.parse(src, env), self.options, env)
markdown_it/main.py:260: in parse
self.core.process(state)
markdown_it/parser_core.py:33: in process
rule(state)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
state = <markdown_it.rules_core.state_core.StateCore object at 0x7f5a2ce87ee0>
def linkify(state: StateCore) -> None:
blockTokens = state.tokens
if not state.md.options.linkify:
return
if not state.md.linkify:
> raise ModuleNotFoundError("Linkify enabled but not installed.")
E ModuleNotFoundError: Linkify enabled but not installed.
markdown_it/rules_core/linkify.py:31: ModuleNotFoundError
______________________________ test_linkify[59-before line-before\ngithub.com\n-<p>before\n<a href="http://github.com">github.com</a></p>\n] _______________________________
line = 59, title = 'before line', input = 'before\ngithub.com\n', expected = '<p>before\n<a href="http://github.com">github.com</a></p>\n'
@pytest.mark.parametrize(
"line,title,input,expected",
read_fixture_file(FIXTURE_PATH.joinpath("linkify.md")),
)
def test_linkify(line, title, input, expected):
md = MarkdownIt().enable("linkify")
md.options["linkify"] = True
> text = md.render(input)
tests/test_port/test_fixtures.py:18:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
markdown_it/main.py:275: in render
return self.renderer.render(self.parse(src, env), self.options, env)
markdown_it/main.py:260: in parse
self.core.process(state)
markdown_it/parser_core.py:33: in process
rule(state)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
state = <markdown_it.rules_core.state_core.StateCore object at 0x7f5a2cd2fe20>
def linkify(state: StateCore) -> None:
blockTokens = state.tokens
if not state.md.options.linkify:
return
if not state.md.linkify:
> raise ModuleNotFoundError("Linkify enabled but not installed.")
E ModuleNotFoundError: Linkify enabled but not installed.
markdown_it/rules_core/linkify.py:31: ModuleNotFoundError
____________________ test_linkify[77-before after lines-before\ngithub.com\nafter\n-<p>before\n<a href="http://github.com">github.com</a>\nafter</p>\n] ____________________
line = 77, title = 'before after lines', input = 'before\ngithub.com\nafter\n', expected = '<p>before\n<a href="http://github.com">github.com</a>\nafter</p>\n'
@pytest.mark.parametrize(
"line,title,input,expected",
read_fixture_file(FIXTURE_PATH.joinpath("linkify.md")),
)
def test_linkify(line, title, input, expected):
md = MarkdownIt().enable("linkify")
md.options["linkify"] = True
> text = md.render(input)
tests/test_port/test_fixtures.py:18:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
markdown_it/main.py:275: in render
return self.renderer.render(self.parse(src, env), self.options, env)
markdown_it/main.py:260: in parse
self.core.process(state)
markdown_it/parser_core.py:33: in process
rule(state)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
state = <markdown_it.rules_core.state_core.StateCore object at 0x7f5a2cca18b0>
def linkify(state: StateCore) -> None:
blockTokens = state.tokens
if not state.md.options.linkify:
return
if not state.md.linkify:
> raise ModuleNotFoundError("Linkify enabled but not installed.")
E ModuleNotFoundError: Linkify enabled but not installed.
markdown_it/rules_core/linkify.py:31: ModuleNotFoundError
__________ test_linkify[9-don't touch text in links-[https://example.com](https://example.com)\n-<p><a href="https://example.com">https://example.com</a></p>\n] ___________
line = 9, title = "don't touch text in links", input = '[https://example.com](https://example.com)\n'
expected = '<p><a href="https://example.com">https://example.com</a></p>\n'
@pytest.mark.parametrize(
"line,title,input,expected",
read_fixture_file(FIXTURE_PATH.joinpath("linkify.md")),
)
def test_linkify(line, title, input, expected):
md = MarkdownIt().enable("linkify")
md.options["linkify"] = True
> text = md.render(input)
tests/test_port/test_fixtures.py:18:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
markdown_it/main.py:275: in render
return self.renderer.render(self.parse(src, env), self.options, env)
markdown_it/main.py:260: in parse
self.core.process(state)
markdown_it/parser_core.py:33: in process
rule(state)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
state = <markdown_it.rules_core.state_core.StateCore object at 0x7f5a2cd48c70>
def linkify(state: StateCore) -> None:
blockTokens = state.tokens
if not state.md.options.linkify:
return
if not state.md.linkify:
> raise ModuleNotFoundError("Linkify enabled but not installed.")
E ModuleNotFoundError: Linkify enabled but not installed.
markdown_it/rules_core/linkify.py:31: ModuleNotFoundError
______________________ test_linkify[33-match links without protocol-www.example.org\n-<p><a href="http://www.example.org">www.example.org</a></p>\n] _______________________
line = 33, title = 'match links without protocol', input = 'www.example.org\n', expected = '<p><a href="http://www.example.org">www.example.org</a></p>\n'
@pytest.mark.parametrize(
"line,title,input,expected",
read_fixture_file(FIXTURE_PATH.joinpath("linkify.md")),
)
def test_linkify(line, title, input, expected):
md = MarkdownIt().enable("linkify")
md.options["linkify"] = True
> text = md.render(input)
tests/test_port/test_fixtures.py:18:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
markdown_it/main.py:275: in render
return self.renderer.render(self.parse(src, env), self.options, env)
markdown_it/main.py:260: in parse
self.core.process(state)
markdown_it/parser_core.py:33: in process
rule(state)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
state = <markdown_it.rules_core.state_core.StateCore object at 0x7f5a2cd5d220>
def linkify(state: StateCore) -> None:
blockTokens = state.tokens
if not state.md.options.linkify:
return
if not state.md.linkify:
> raise ModuleNotFoundError("Linkify enabled but not installed.")
E ModuleNotFoundError: Linkify enabled but not installed.
markdown_it/rules_core/linkify.py:31: ModuleNotFoundError
________________________________ test_linkify[68-after line-github.com\nafter\n-<p><a href="http://github.com">github.com</a>\nafter</p>\n] ________________________________
line = 68, title = 'after line', input = 'github.com\nafter\n', expected = '<p><a href="http://github.com">github.com</a>\nafter</p>\n'
@pytest.mark.parametrize(
"line,title,input,expected",
read_fixture_file(FIXTURE_PATH.joinpath("linkify.md")),
)
def test_linkify(line, title, input, expected):
md = MarkdownIt().enable("linkify")
md.options["linkify"] = True
> text = md.render(input)
tests/test_port/test_fixtures.py:18:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
markdown_it/main.py:275: in render
return self.renderer.render(self.parse(src, env), self.options, env)
markdown_it/main.py:260: in parse
self.core.process(state)
markdown_it/parser_core.py:33: in process
rule(state)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
state = <markdown_it.rules_core.state_core.StateCore object at 0x7f5a2cca6df0>
def linkify(state: StateCore) -> None:
blockTokens = state.tokens
if not state.md.options.linkify:
return
if not state.md.linkify:
> raise ModuleNotFoundError("Linkify enabled but not installed.")
E ModuleNotFoundError: Linkify enabled but not installed.
markdown_it/rules_core/linkify.py:31: ModuleNotFoundError
============================================================================= warnings summary =============================================================================
tests/test_api/test_token.py::test_nest_tokens
tests/test_api/test_token.py::test_nest_tokens
tests/test_api/test_token.py::test_nest_tokens
/home/tkloczko/rpmbuild/BUILD/markdown-it-py-1.1.0/markdown_it/token.py:194: DeprecationWarning: `markdown_it.token.nest_tokens` and `markdown_it.token.NestedTokens` are deprecated. Please migrate to `markdown_it.tree.SyntaxTreeNode`
warnings.warn(
-- Docs: https://docs.pytest.org/en/stable/warnings.html
========================================================================= short test summary info ==========================================================================
XFAIL tests/test_port/test_fixtures.py::test_fatal[17-Should not throw exception on broken utf-16 surrogates sequence in URL [mailformed URI]-[foo](�)\n-<p><a href="&#xD800;">foo</a></p>\n]
reason: url normalisation
XFAIL tests/test_port/test_fixtures.py::test_normalize_url[17-Keep %25 as is because decoding it may break urls, #720-<https://www.google.com/search?q=hello%2E%252Ehello>\n-<p><a href="https://www.google.com/search?q=hello%2E%252Ehello">https://www.google.com/search?q=hello.%252Ehello</a></p>\n]
reason: url normalisation
XFAIL tests/test_port/test_fixtures.py::test_commonmark_extras[88-Checking combination of replaceEntities and unescapeMd:-~~~ &&bad;\\&\\\\&\njust a funny little fence\n~~~\n-<pre><code class="&&bad;&amp;\\&">just a funny little fence\n</code></pre>\n]
reason: escaping entities in link titles / fence.info
XFAIL tests/test_port/test_fixtures.py::test_fatal[1-Should not throw exception on invalid chars in URL (`*` not allowed in path) [mailformed URI]-[foo](<%test>)\n-<p><a href="%25test">foo</a></p>\n]
reason: url normalisation
XFAIL tests/test_port/test_fixtures.py::test_commonmark_extras[74-Escaping entities in links:-[](<"> "&ö")\n\n[](<\\"> "\\&\\ö")\n\n[](<\\\\"> "\\\\"\\\\ö")\n-<p><a href="%22" title="&\xf6"></a></p>\n<p><a href="&quot;" title="&amp;&ouml;"></a></p>\n<p><a href="%5C%22" title="\\"\\\xf6"></a></p>\n]
reason: escaping entities in link titles / fence.info
ERROR tests/test_api/test_main.py::test_table_tokens
ERROR tests/test_port/test_references.py::test_store_labels
ERROR tests/test_port/test_references.py::test_use_existing_env
ERROR tests/test_tree.py::test_pretty
ERROR tests/test_cmark_spec/test_spec.py::test_file
FAILED tests/test_linkify.py::test_token_levels - ModuleNotFoundError: Linkify enabled but not installed.
FAILED tests/test_port/test_fixtures.py::test_linkify[52-typorgapher should not break href-http://example.com/(c)\n-<p><a href="http://example.com/(c)">http://example.com/(c)</a></p>\n]
FAILED tests/test_port/test_fixtures.py::test_linkify[41-emails-test@example.com\n\nmailto:test@example.com\n-<p><a href="mailto:test@example.com">test@example.com</a></p>\n<p><a href="mailto:test@example.com">mailto:test@example.com</a></p>\n]
FAILED tests/test_port/test_fixtures.py::test_linkify[1-linkify-url http://www.youtube.com/watch?v=5Jt5GEr4AYg.\n-<p>url <a href="http://www.youtube.com/watch?v=5Jt5GEr4AYg">http://www.youtube.com/watch?v=5Jt5GEr4AYg</a>.</p>\n]
FAILED tests/test_port/test_fixtures.py::test_linkify[88-before after lines with blank line-before\n\ngithub.com\n\nafter\n-<p>before</p>\n<p><a href="http://github.com">github.com</a></p>\n<p>after</p>\n]
FAILED tests/test_port/test_fixtures.py::test_linkify[17-don't touch text in autolinks-<https://example.com>\n-<p><a href="https://example.com">https://example.com</a></p>\n]
FAILED tests/test_port/test_fixtures.py::test_linkify[25-don't touch text in html <a> tags-<a href="https://example.com">https://example.com</a>\n-<p><a href="https://example.com">https://example.com</a></p>\n]
FAILED tests/test_port/test_fixtures.py::test_linkify[59-before line-before\ngithub.com\n-<p>before\n<a href="http://github.com">github.com</a></p>\n] - ModuleNotFoundEr...
FAILED tests/test_port/test_fixtures.py::test_linkify[77-before after lines-before\ngithub.com\nafter\n-<p>before\n<a href="http://github.com">github.com</a>\nafter</p>\n]
FAILED tests/test_port/test_fixtures.py::test_linkify[9-don't touch text in links-[https://example.com](https://example.com)\n-<p><a href="https://example.com">https://example.com</a></p>\n]
FAILED tests/test_port/test_fixtures.py::test_linkify[33-match links without protocol-www.example.org\n-<p><a href="http://www.example.org">www.example.org</a></p>\n] - ...
FAILED tests/test_port/test_fixtures.py::test_linkify[68-after line-github.com\nafter\n-<p><a href="http://github.com">github.com</a>\nafter</p>\n] - ModuleNotFoundError...
===================================================== 12 failed, 839 passed, 5 xfailed, 3 warnings, 5 errors in 10.53s ===================================================== |
warning after deselecting faling units: ============================================================================= warnings summary =============================================================================
tests/test_api/test_token.py::test_nest_tokens
tests/test_api/test_token.py::test_nest_tokens
tests/test_api/test_token.py::test_nest_tokens
/home/tkloczko/rpmbuild/BUILD/markdown-it-py-1.1.0/markdown_it/token.py:194: DeprecationWarning: `markdown_it.token.nest_tokens` and `markdown_it.token.NestedTokens` are deprecated. Please migrate to `markdown_it.tree.SyntaxTreeNode`
warnings.warn(
-- Docs: https://docs.pytest.org/en/stable/warnings.html
========================================================================= short test summary info ==========================================================================
XFAIL tests/test_port/test_fixtures.py::test_fatal[17-Should not throw exception on broken utf-16 surrogates sequence in URL [mailformed URI]-[foo](�)\n-<p><a href="&#xD800;">foo</a></p>\n]
reason: url normalisation
XFAIL tests/test_port/test_fixtures.py::test_fatal[1-Should not throw exception on invalid chars in URL (`*` not allowed in path) [mailformed URI]-[foo](<%test>)\n-<p><a href="%25test">foo</a></p>\n]
reason: url normalisation
XFAIL tests/test_port/test_fixtures.py::test_commonmark_extras[88-Checking combination of replaceEntities and unescapeMd:-~~~ &&bad;\\&\\\\&\njust a funny little fence\n~~~\n-<pre><code class="&&bad;&amp;\\&">just a funny little fence\n</code></pre>\n]
reason: escaping entities in link titles / fence.info
XFAIL tests/test_port/test_fixtures.py::test_normalize_url[17-Keep %25 as is because decoding it may break urls, #720-<https://www.google.com/search?q=hello%2E%252Ehello>\n-<p><a href="https://www.google.com/search?q=hello%2E%252Ehello">https://www.google.com/search?q=hello.%252Ehello</a></p>\n]
reason: url normalisation
XFAIL tests/test_port/test_fixtures.py::test_commonmark_extras[74-Escaping entities in links:-[](<"> "&ö")\n\n[](<\\"> "\\&\\ö")\n\n[](<\\\\"> "\\\\"\\\\ö")\n-<p><a href="%22" title="&\xf6"></a></p>\n<p><a href="&quot;" title="&amp;&ouml;"></a></p>\n<p><a href="%5C%22" title="\\"\\\xf6"></a></p>\n]
reason: escaping entities in link titles / fence.info
======================================================== 839 passed, 17 deselected, 5 xfailed, 3 warnings in 10.11s ======================================================== |
again this is because you did not install the test extras: |
yes these are pytest xfails => expected failures |
Could you please point on exact modules which are missing in my env? |
If you run with tox, you'll get exactly the correct environment to run in, or you can look at all the CI runs what is installed: https://github.com/executablebooks/markdown-it-py/runs/2866753699?check_suite_focus=true |
The text was updated successfully, but these errors were encountered: