From 8d5f2ca9173bd7e93263f73cfdf0f94a897765c3 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Tue, 19 Dec 2017 20:03:01 +0100 Subject: [PATCH] * tests/python/ipnbdoctest.py: Work around different pandas versions. --- tests/python/ipnbdoctest.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/python/ipnbdoctest.py b/tests/python/ipnbdoctest.py index f8254cc72..59747354e 100755 --- a/tests/python/ipnbdoctest.py +++ b/tests/python/ipnbdoctest.py @@ -109,6 +109,9 @@ def sanitize(s): s = re.sub(r' fill="black"', '', s) s = re.sub(r' stroke="transparent"', ' stroke="none"', s) s = re.sub(r'>', '>\n<title>', s) + # Different Pandas versions produce different CSS styles. + s = re.sub(r'<style[ a-z]*>.*</style>', + '<style>...</style>', s, flags=re.DOTALL) # CalledProcessError message has a final dot in Python 3.6 s = re.sub(r"(' returned non-zero exit status \d+)\.", r'\1', s)