Skip to content

Commit 89d1d65

Browse files
author
Release Manager
committed
sagemathgh-38294: Filter out R warnings These are causing some doctest failures after sagemath#35396 ``` ********************************************************************** File "/usr/lib/python3.12/site-packages/sage/interfaces/r.py", line 51, in sage.interfaces.r Failed example: v = 2*x+y+1; v Expected: [1] 32.2 17.8 10.3 20.2 66.1 21.8 22.6 12.8 16.9 50.8 43.5 Got: R[write to console]: Además: R[write to console]: Aviso: <BLANKLINE> R[write to console]: In sage10 + sage6 : R[write to console]: <BLANKLINE> R[write to console]: longitud de objeto mayor no es múltiplo de la longitud de uno menor <BLANKLINE> [1] 32.2 17.8 10.3 20.2 66.1 21.8 22.6 12.8 16.9 50.8 43.5 ********************************************************************** File "/usr/lib/python3.12/site-packages/sage/interfaces/r.py", line 78, in sage.interfaces.r Failed example: r(-17).sqrt() Expected: [1] NaN Got: R[write to console]: Además: R[write to console]: Aviso: <BLANKLINE> R[write to console]: In sqrt(sage10) : R[write to console]: Se han producido NaNs <BLANKLINE> [1] NaN ********************************************************************** File "/usr/lib/python3.12/site-packages/sage/interfaces/r.py", line 356, in sage.interfaces.r._setup_r_to_sage_converter Failed example: r(-17).sqrt().sage() Expected: nan Got: R[write to console]: Además: R[write to console]: Aviso: <BLANKLINE> R[write to console]: In sqrt(sage4) : R[write to console]: Se han producido NaNs <BLANKLINE> nan ********************************************************************** ``` URL: sagemath#38294 Reported by: Antonio Rojas Reviewer(s): Matthias Köppe
2 parents 2e5cb46 + 23497d0 commit 89d1d65

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/sage/doctest/parsing.py

+6
Original file line numberDiff line numberDiff line change
@@ -1688,6 +1688,12 @@ def do_fixup(self, want, got):
16881688
got = ld_pie_warning_regex.sub('', got)
16891689
did_fixup = True
16901690

1691+
if "R[write to console]" in got:
1692+
# Supress R warnings
1693+
r_warning_regex = re.compile(r'R\[write to console\]:.*')
1694+
got = r_warning_regex.sub('', got)
1695+
did_fixup = True
1696+
16911697
if "Overriding pythran description" in got:
16921698
# Some signatures changed in numpy-1.25.x that may yet be
16931699
# reverted, but which pythran would otherwise warn about.

0 commit comments

Comments
 (0)