Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
fix doctest in docs folder (instancedoc)
Browse files Browse the repository at this point in the history
  • Loading branch information
Frédéric Chapoton committed Sep 19, 2018
1 parent ca26fcc commit ded34f6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/sage/docs/instancedoc.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ Check that inheritance works (after passing the subclass to
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
# http://www.gnu.org/licenses/
# https://www.gnu.org/licenses/
#*****************************************************************************

from cpython.object cimport PyObject, PyTypeObject
Expand Down Expand Up @@ -311,11 +311,16 @@ def instancedoc(cls):
Traceback (most recent call last):
...
TypeError: expected type, got 7
sage: class OldStyle: pass
sage: instancedoc(OldStyle)
sage: instancedoc(OldStyle) # py2
Traceback (most recent call last):
...
TypeError: expected type, got <class __main__.OldStyle at ...>
sage: instancedoc(OldStyle) # py3
Traceback (most recent call last):
...
TypeError: instancedoc requires <class '__main__.OldStyle'> to have an '_instancedoc_' attribute
"""
cdef PyTypeObject* tp = TypeObject(cls)
try:
Expand Down

0 comments on commit ded34f6

Please sign in to comment.