# HG changeset patch
# User Nicolas M. Thiery <nthiery@users.sf.net>
# Date 1331914883 -3600
# Node ID f721b81ee99294a8fcfb525afef96d919210e452
# Parent a9be55f78734eaa798db314e2051a052757640ed
#12677: Make the doctests of sage.misc.sageinspect.sage_getargspec independent of ``Poset``
diff --git a/sagenb/misc/sageinspect.py b/sagenb/misc/sageinspect.py
a
|
b
|
def sage_getargspec(obj): |
648 | 648 | EXAMPLES:: |
649 | 649 | |
650 | 650 | sage: from sagenb.misc.sageinspect import sage_getargspec |
| 651 | sage: def f(x, y, z=1, t=2, *args, **keywords): |
| 652 | ... pass |
| 653 | sage: sage_getargspec(f) |
| 654 | (['x', 'y', 'z', 't'], 'args', 'keywords', (1, 2)) |
| 655 | |
| 656 | We now run sage_getargspec on some functions from the Sage library:: |
| 657 | |
651 | 658 | sage: sage_getargspec(identity_matrix) |
652 | 659 | (['ring', 'n', 'sparse'], None, None, (0, False)) |
653 | | sage: sage_getargspec(Poset) |
654 | | (['data', 'element_labels', 'cover_relations', 'category', 'facade', 'key'], None, None, (None, None, False, None, None, None)) |
655 | 660 | sage: sage_getargspec(factor) |
656 | 661 | (['n', 'proof', 'int_', 'algorithm', 'verbose'], |
657 | 662 | None, |