Opened 5 years ago

Closed 4 years ago

#21249 closed defect (fixed)

RealSets fail their TestSuite: _test_category, _test_pickling

Reported by: mkoeppe Owned by:
Priority: major Milestone: sage-7.6
Component: categories Keywords: days85
Cc: rws, vbraun, pbruin, nthiery, tscrim, novoselt, vdelecroix, SimonKing 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 5 years ago by mkoeppe

  • Cc novoselt added

comment:2 Changed 4 years ago by mkoeppe

  • Branch set to u/mkoeppe/realsets_fail_their_testsuite___test_category___test_pickling

comment:3 Changed 4 years ago by mkoeppe

  • Authors set to Matthias Koeppe
  • Commit set to c71e098f033bfed64a63d72657e001d270e262c4
  • Milestone changed from sage-7.4 to sage-7.6
  • Status changed from new to needs_review

New commits:

c71e098RealSet: Fix pickling, category initialization

comment:4 Changed 4 years ago by mkoeppe

  • Cc vdelecroix SimonKing added

comment:5 Changed 4 years ago by hivert

  • Branch changed from u/mkoeppe/realsets_fail_their_testsuite___test_category___test_pickling to u/hivert/realsets_fail_their_testsuite___test_category___test_pickling

comment:6 Changed 4 years ago by hivert

  • Commit changed from c71e098f033bfed64a63d72657e001d270e262c4 to d641083241830c87c721c52f65ccbb986a8d8821

Rebased on Sage-7.6rc0


New commits:

d641083Merge branch 'develop' into t/21249/realsets_fail_their_testsuite___test_category___test_pickling

comment:7 Changed 4 years ago by hivert

  • Reviewers set to Florent Hivert
  • Status changed from needs_review to positive_review

Looks good to me.

comment:8 Changed 4 years ago by mkoeppe

Thank you!

comment:9 Changed 4 years ago by hivert

  • Keywords days85 added

comment:10 Changed 4 years ago by vbraun

  • Branch changed from u/hivert/realsets_fail_their_testsuite___test_category___test_pickling to d641083241830c87c721c52f65ccbb986a8d8821
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.