Skip to content

Commit 8d2f78c

Browse files
committed
Fix more failing tests
1 parent eb40ba1 commit 8d2f78c

File tree

1 file changed

+12
-6
lines changed
  • src/sage/interfaces

1 file changed

+12
-6
lines changed

src/sage/interfaces/r.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -264,19 +264,24 @@
264264
# https://www.gnu.org/licenses/
265265
#
266266
# ************************************************************************
267-
import os
268267
import logging
268+
import os
269+
import re
269270

270-
from .interface import Interface, InterfaceElement, InterfaceFunction, InterfaceFunctionElement
271271
from sage.env import DOT_SAGE
272-
import re
273-
from sage.structure.element import parent
272+
from sage.features import PythonModule
273+
from sage.interfaces.interface import (
274+
Interface,
275+
InterfaceElement,
276+
InterfaceFunction,
277+
InterfaceFunctionElement,
278+
)
274279
from sage.interfaces.tab_completion import ExtraTabCompletion
275280
from sage.misc.instancedoc import instancedoc
276281

277282
# see the _lazy_init for some reasoning behind the lazy imports
278283
from sage.misc.lazy_import import lazy_import
279-
from sage.features import PythonModule
284+
from sage.structure.element import parent
280285

281286
rpy2_feature = PythonModule('rpy2', spkg='rpy2', type='standard')
282287

@@ -371,7 +376,7 @@ def _setup_r_to_sage_converter():
371376
sage: labs = r.paste('c("X","Y")', '1:10', sep='""'); labs.sage()
372377
['X1', 'Y2', 'X3', 'Y4', 'X5', 'Y6', 'X7', 'Y8', 'X9', 'Y10']
373378
"""
374-
from rpy2.rinterface import SexpVector, ListSexpVector, FloatSexpVector
379+
from rpy2.rinterface import FloatSexpVector, ListSexpVector, SexpVector
375380

376381
# convert rpy2's representation of r objects to the one sage expects (as defined by the old
377382
# expect interface)
@@ -484,6 +489,7 @@ def __init__(self,
484489
485490
TESTS::
486491
492+
sage: from sage.interfaces.r import r
487493
sage: r == loads(dumps(r))
488494
True
489495
"""

0 commit comments

Comments
 (0)