Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

piecewise and hypergeometric functions fail their TestSuite: _test_category, _test_pickling #22399

Open
mkoeppe opened this issue Feb 21, 2017 · 1 comment

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented Feb 21, 2017

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

Depends on #21249

CC: @vbraun @rwst @videlec

Component: symbolics

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

@mkoeppe mkoeppe added this to the sage-7.6 milestone Feb 21, 2017
@mkoeppe

This comment has been minimized.

@mkoeppe mkoeppe changed the title piecewise functions fail their TestSuite: _test_category, _test_pickling piecewise and hypergeometric functions fail their TestSuite: _test_category, _test_pickling Feb 21, 2017
@mkoeppe mkoeppe removed this from the sage-7.6 milestone Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant