Skip to content

RealSets fail their TestSuite: _test_category, _test_pickling #21249

@mkoeppe

Description

@mkoeppe
sage: R01 = RealSet(0, 1)
sage: TestSuite(R01).run()
Failure in _test_category:
Traceback (most recent call last):
  File "/Users/mkoeppe/cvs/sage/local/lib/python2.7/site-packages/sage/misc/sage_unittest.py", line 283, in run
    test_method(tester = tester)
  File "sage/structure/parent.pyx", line 698, in sage.structure.parent.Parent._test_category (build/cythonized/sage/structure/parent.c:7323)
    tester.assertTrue(isinstance(self, category.parent_class),
  File "/Users/mkoeppe/cvs/sage/local/lib/python/unittest/case.py", line 424, in assertTrue
    raise self.failureException(msg)
AssertionError: category of self improperly initialized
------------------------------------------------------------
Failure in _test_pickling:
Traceback (most recent call last):
  File "/Users/mkoeppe/cvs/sage/local/lib/python2.7/site-packages/sage/misc/sage_unittest.py", line 283, in run
    test_method(tester = tester)
  File "sage/structure/sage_object.pyx", line 613, in sage.structure.sage_object.SageObject._test_pickling (build/cythonized/sage/structure/sage_object.c:5024)
    tester.assertEqual(loads(dumps(self)), self)
  File "sage/structure/sage_object.pyx", line 1355, in sage.structure.sage_object.loads (build/cythonized/sage/structure/sage_object.c:13614)
    return unpickler.load()
  File "/Users/mkoeppe/cvs/sage/local/lib/python2.7/site-packages/sage/structure/unique_representation.py", line 1176, in unreduce
    return cls(*args, **keywords)
  File "sage/misc/classcall_metaclass.pyx", line 330, in sage.misc.classcall_metaclass.ClasscallMetaclass.__call__ (build/cythonized/sage/misc/classcall_metaclass.c:1251)
    return cls.classcall(cls, *args, **kwds)
  File "/Users/mkoeppe/cvs/sage/local/lib/python2.7/site-packages/sage/sets/real_set.py", line 635, in __classcall__
    lower, upper = RealSet._prep(*arg)
  File "/Users/mkoeppe/cvs/sage/local/lib/python2.7/site-packages/sage/sets/real_set.py", line 896, in _prep
    lower = RLF(lower)
  File "sage/structure/parent.pyx", line 1107, in sage.structure.parent.Parent.__call__ (build/cythonized/sage/structure/parent.c:10005)
    return mor._call_(x)
  File "sage/structure/coerce_maps.pyx", line 67, in sage.structure.coerce_maps.DefaultConvertMap._call_ (build/cythonized/sage/structure/coerce_maps.c:3700)
    raise
  File "sage/structure/coerce_maps.pyx", line 62, in sage.structure.coerce_maps.DefaultConvertMap._call_ (build/cythonized/sage/structure/coerce_maps.c:3589)
    return C._element_constructor(C, x)
  File "sage/rings/real_lazy.pyx", line 950, in sage.rings.real_lazy.LazyWrapper.__init__ (build/cythonized/sage/rings/real_lazy.c:10821)
    self._parent.interval_field()(value)
  File "sage/rings/real_mpfi.pyx", line 670, in sage.rings.real_mpfi.RealIntervalField_class.__call__ (build/cythonized/sage/rings/real_mpfi.c:5725)
    return RealIntervalFieldElement(self, x, base)
  File "sage/rings/real_mpfi.pyx", line 1240, in sage.rings.real_mpfi.RealIntervalFieldElement.__init__ (build/cythonized/sage/rings/real_mpfi.c:10234)
    raise TypeError("unable to convert {!r} to real interval".format(x))
TypeError: (TypeError('unable to convert (0, 1) to real interval',), <function unreduce at 0x10af64c80>, (<class 'sage.sets.real_set.RealSet'>, (((0, 1),),), {}))
------------------------------------------------------------
The following tests failed: _test_category, _test_pickling

CC: @rwst @vbraun @pjbruin @nthiery @tscrim @novoselt @videlec @simon-king-jena

Component: categories

Keywords: days85

Author: Matthias Koeppe

Branch/Commit: d641083

Reviewer: Florent Hivert

Issue created by migration from https://trac.sagemath.org/ticket/21249

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions