mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
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@gentoo.org>
This commit is contained in:
@@ -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 <stefano@rivera.za.net>
|
||||
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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user