Opened 3 years ago

Last modified 3 years ago

#22399 new defect

piecewise and hypergeometric functions fail their TestSuite: _test_category, _test_pickling

Reported by: mkoeppe Owned by:
Priority: major Milestone: sage-7.6
Component: symbolics Keywords:
Cc: vbraun, rws, vdelecroix Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: #21249 Stopgaps:

Description (last modified by mkoeppe)

Even after #21249, piecewise functions fail their TestSuite:

sage: step = piecewise([((-1, 0), -1), ([0, 0], 0), ((0, 1), 1)], var=x);  step
piecewise(x|-->-1 on (-1, 0), x|-->0 on {0}, x|-->1 on (0, 1); x)
sage: TestSuite(step).run()
Failure in _test_category:
Traceback (most recent call last):
  File "/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/lib/python2.7/site-packages/sage/misc/sage_unittest.py", line 293, in run
    test_method(tester = tester)
  File "sage/structure/element.pyx", line 667, in sage.structure.element.Element._test_category (build/cythonized/sage/structure/element.c:6348)
    tester.assert_(isinstance(self, self.parent().category().element_class))
  File "/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/lib/python/unittest/case.py", line 422, in assertTrue
    raise self.failureException(msg)
AssertionError: False is not true
------------------------------------------------------------
Failure in _test_pickling:
Traceback (most recent call last):
  File "/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/lib/python2.7/site-packages/sage/misc/sage_unittest.py", line 293, in run
    test_method(tester = tester)
  File "sage/structure/sage_object.pyx", line 638, in sage.structure.sage_object.SageObject._test_pickling (build/cythonized/sage/structure/sage_object.c:5753)
    tester.assertEqual(loads(dumps(self)), self)
  File "sage/structure/sage_object.pyx", line 1113, in sage.structure.sage_object.dumps (build/cythonized/sage/structure/sage_object.c:13793)
    return obj.dumps(compress)
  File "sage/structure/sage_object.pyx", line 454, in sage.structure.sage_object.SageObject.dumps (build/cythonized/sage/structure/sage_object.c:4193)
    s = cPickle.dumps(self, protocol=2)
PicklingError: Can't pickle <class 'sage.functions.piecewise.EvaluationMethods'>: attribute lookup sage.functions.piecewise.EvaluationMethods failed
------------------------------------------------------------
The following tests failed: _test_category, _test_pickling

Same errors for hypergeometric:

sage: TestSuite(hypergeometric([2, 3], [1], 1)).run()
Failure in _test_category:
Traceback (most recent call last):
  File "/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/lib/python2.7/site-packages/sage/misc/sage_unittest.py", line 293, in run
    test_method(tester = tester)
  File "sage/structure/element.pyx", line 667, in sage.structure.element.Element._test_category (build/cythonized/sage/structure/element.c:6348)
    tester.assert_(isinstance(self, self.parent().category().element_class))
  File "/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/lib/python/unittest/case.py", line 422, in assertTrue
    raise self.failureException(msg)
AssertionError: False is not true
------------------------------------------------------------
Failure in _test_pickling:
Traceback (most recent call last):
  File "/Users/mkoeppe/s/sage/sage-rebasing/another-local-sans-autotools/lib/python2.7/site-packages/sage/misc/sage_unittest.py", line 293, in run
    test_method(tester = tester)
  File "sage/structure/sage_object.pyx", line 638, in sage.structure.sage_object.SageObject._test_pickling (build/cythonized/sage/structure/sage_object.c:5753)
    tester.assertEqual(loads(dumps(self)), self)
  File "sage/structure/sage_object.pyx", line 1113, in sage.structure.sage_object.dumps (build/cythonized/sage/structure/sage_object.c:13793)
    return obj.dumps(compress)
  File "sage/structure/sage_object.pyx", line 454, in sage.structure.sage_object.SageObject.dumps (build/cythonized/sage/structure/sage_object.c:4193)
    s = cPickle.dumps(self, protocol=2)
PicklingError: Can't pickle <class 'sage.functions.hypergeometric.EvaluationMethods'>: attribute lookup sage.functions.hypergeometric.EvaluationMethods failed
------------------------------------------------------------
The following tests failed: _test_category, _test_pickling

Change History (1)

comment:1 Changed 3 years ago by mkoeppe

  • Cc vbraun rws vdelecroix added
  • Description modified (diff)
  • Summary changed from piecewise functions fail their TestSuite: _test_category, _test_pickling to piecewise and hypergeometric functions fail their TestSuite: _test_category, _test_pickling
Note: See TracTickets for help on using tickets.