commit: 019aecf4699abf09993e9de70c485c82b3bb79c7 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Sun Mar 13 17:54:45 2022 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sun Mar 13 17:55:02 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=019aecf4
dev-python/myst_parser: add 32-bit test fix Test-only fix, doesn't affect runtime. Closes: https://bugs.gentoo.org/832823 Signed-off-by: Sam James <sam <AT> gentoo.org> .../files/myst_parser-0.17.0-32-bit-test-fix.patch | 33 ++++++++++++++++++++++ dev-python/myst_parser/myst_parser-0.17.0.ebuild | 6 +++- 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/dev-python/myst_parser/files/myst_parser-0.17.0-32-bit-test-fix.patch b/dev-python/myst_parser/files/myst_parser-0.17.0-32-bit-test-fix.patch new file mode 100644 index 000000000000..2363ac639c60 --- /dev/null +++ b/dev-python/myst_parser/files/myst_parser-0.17.0-32-bit-test-fix.patch @@ -0,0 +1,33 @@ +https://github.com/executablebooks/MyST-Parser/pull/523 +https://bugs.gentoo.org/832823 + +From 84b0223eace0a1022935f2766da6c930181503e4 Mon Sep 17 00:00:00 2001 +From: Stefano Rivera <[email protected]> +Date: Sat, 19 Feb 2022 14:57:58 -0400 +Subject: [PATCH] Massage test output on 32-bit systems to match 64-bit systems + +Fixes test_sphinx_directives[35-highlight (sphinx.directives.code.Highlight):] +which was failing on 32-bit platforms due to linenothreshold defaulting +to sys.maxsize. + +Fixes: #522 +--- a/tests/test_renderers/test_fixtures_sphinx.py ++++ b/tests/test_renderers/test_fixtures_sphinx.py +@@ -3,6 +3,7 @@ + Note, the output AST is before any transforms are applied. + """ + import re ++import sys + from pathlib import Path + + import pytest +@@ -50,6 +51,9 @@ def test_sphinx_directives(file_params): + document = to_docutils(file_params.content, in_sphinx_env=True).pformat() + # see https://github.com/sphinx-doc/sphinx/issues/9827 + document = document.replace('<glossary sorted="False">', "<glossary>") ++ # see https://github.com/executablebooks/MyST-Parser/issues/522 ++ if sys.maxsize == 2147483647: ++ document = document.replace('"2147483647"', '"9223372036854775807"') + file_params.assert_expected(document, rstrip_lines=True) + + diff --git a/dev-python/myst_parser/myst_parser-0.17.0.ebuild b/dev-python/myst_parser/myst_parser-0.17.0.ebuild index 2f5dd497b747..e7a7eef336a8 100644 --- a/dev-python/myst_parser/myst_parser-0.17.0.ebuild +++ b/dev-python/myst_parser/myst_parser-0.17.0.ebuild @@ -38,10 +38,14 @@ BDEPEND=" ) " -distutils_enable_tests pytest +PATCHES=( + "${FILESDIR}"/${PN}-0.17.0-32-bit-test-fix.patch +) EPYTEST_DESELECT=( # Unimportant tests needing a new dep linkify tests/test_renderers/test_myst_config.py::test_cmdline tests/test_sphinx/test_sphinx_builds.py::test_extended_syntaxes ) + +distutils_enable_tests pytest
