You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1.2 KiB

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)