Opened 6 years ago

Closed 6 years ago

#21249 closed defect (fixed)

RealSets fail their TestSuite: _test_category, _test_pickling

Reported by: Matthias Köppe Owned by:
Priority: major Milestone: sage-7.6
Component: categories Keywords: days85
Cc: Ralf Stephan, Volker Braun, Peter Bruin, Nicolas M. Thiéry, Travis Scrimshaw, Andrey Novoseltsev, Vincent Delecroix, Simon King Merged in:
Authors: Matthias Koeppe Reviewers: Florent Hivert
Report Upstream: N/A Work issues:
Branch: d641083 (Commits, GitHub, GitLab) Commit: d641083241830c87c721c52f65ccbb986a8d8821
Dependencies: Stopgaps:

Status badges

Description

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

Change History (10)

comment:1 Changed 6 years ago by Matthias Köppe

Cc: Andrey Novoseltsev added

comment:2 Changed 6 years ago by Matthias Köppe

Branch: u/mkoeppe/realsets_fail_their_testsuite___test_category___test_pickling

comment:3 Changed 6 years ago by Matthias Köppe

Authors: Matthias Koeppe
Commit: c71e098f033bfed64a63d72657e001d270e262c4
Milestone: sage-7.4sage-7.6
Status: newneeds_review

New commits:

c71e098RealSet: Fix pickling, category initialization

comment:4 Changed 6 years ago by Matthias Köppe

Cc: Vincent Delecroix Simon King added

comment:5 Changed 6 years ago by Florent Hivert

Branch: u/mkoeppe/realsets_fail_their_testsuite___test_category___test_picklingu/hivert/realsets_fail_their_testsuite___test_category___test_pickling

comment:6 Changed 6 years ago by Florent Hivert

Commit: c71e098f033bfed64a63d72657e001d270e262c4d641083241830c87c721c52f65ccbb986a8d8821

Rebased on Sage-7.6rc0


New commits:

d641083Merge branch 'develop' into t/21249/realsets_fail_their_testsuite___test_category___test_pickling

comment:7 Changed 6 years ago by Florent Hivert

Reviewers: Florent Hivert
Status: needs_reviewpositive_review

Looks good to me.

comment:8 Changed 6 years ago by Matthias Köppe

Thank you!

comment:9 Changed 6 years ago by Florent Hivert

Keywords: days85 added

comment:10 Changed 6 years ago by Volker Braun

Branch: u/hivert/realsets_fail_their_testsuite___test_category___test_picklingd641083241830c87c721c52f65ccbb986a8d8821
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.