#15500: is_integer method is missing on integers
-------------------------------------+-------------------------------------
Reporter: ppurka | Owner:
Type: defect | Status: needs_review
Priority: major | Milestone: sage-6.2
Component: algebra | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/Rajesh_Veeranki/ticket/15500 | 85f8025244f1b273781780a922332bb2605d5f1f
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by ppurka):
Thanks for the patches!
There are two doctest failures. It needs a bit more work. We will also
have to check that it does not affect anything else adversely:
{{{
sage -t --long src/sage/structure/element.pyx
**********************************************************************
File "src/sage/structure/element.pyx", line 354, in
sage.structure.element.Element.__dir__
Failed example:
dir(1/2)
Expected:
['N', ..., 'is_idempotent', 'is_integral', ...]
Got:
['N', '__abs__', '__add__', '__array_interface__', '__class__',
'__cmp__', '__copy__', '__delattr__', '__dict__', '__dir__', '__div__',
'__doc__', '__eq__', '__float__', '__floordiv__', '__foo', '__format__',
'__ge__', '__getattribute__', '__getitem__', '__getstate__', '__gt__',
'__hash__', '__iadd__', '__idiv__', '__imul__', '__index__', '__init__',
'__int__', '__invert__', '__isub__', '__le__', '__long__', '__lshift__',
'__lt__', '__mod__', '__module__', '__mul__', '__ne__', '__neg__',
'__new__', '__nonzero__', '__pos__', '__pow__', '__pyx_vtable__',
'__radd__', '__rdiv__', '__reduce__', '__reduce_ex__', '__repr__',
'__rfloordiv__', '__rlshift__', '__rmod__', '__rmul__', '__rpow__',
'__rrshift__', '__rshift__', '__rsub__', '__rtruediv__', '__rxor__',
'__setattr__', '__setstate__', '__sizeof__', '__str__', '__sub__',
'__subclasshook__', '__truediv__', '__weakref__', '__xor__', '_act_on_',
'_acted_upon_', '_add_', '_add_parent', '_ascii_art_', '_axiom_',
'_axiom_init_', '_bnfisnorm', '_cmp_', '_coeff_repr', '_derivative',
'_div_', '_dummy_attribute', '_fricas_', '_fricas_init_', '_gap_',
'_gap_init_', '_giac_', '_giac_init_', '_gp_', '_gp_init_', '_iadd_',
'_idiv_', '_ilmul_', '_im_gens_', '_imul_', '_integer_', '_interface_',
'_interface_init_', '_interface_is_cached_', '_is_atomic', '_isub_',
'_kash_', '_kash_init_', '_latex_', '_latex_coeff_repr', '_lcm', '_lmul_',
'_macaulay2_', '_macaulay2_init_', '_magma_init_',
'_make_new_with_parent_c', '_maple_', '_maple_init_', '_mathematica_',
'_mathematica_init_', '_mathml_', '_maxima_', '_maxima_init_',
'_maxima_lib_', '_maxima_lib_init_', '_mpmath_', '_mul_', '_mul_parent',
'_neg_', '_octave_', '_octave_init_', '_pari_', '_pari_init_', '_pow_',
'_pow_naive', '_r_init_', '_reduce_set', '_reduction', '_repr_',
'_richcmp_', '_rmul_', '_sage_', '_sage_input_', '_sage_src_lines_',
'_set_parent', '_singular_', '_singular_init_', '_sub_', '_sympy_',
'_test_category', '_test_eq', '_test_nonzero_equal',
'_test_not_implemented_methods', '_test_pickling', '_tester', 'abs',
'absolute_norm', 'additive_order', 'base_extend', 'base_ring',
'cartesian_product', 'category', 'ceil', 'charpoly', 'conjugate',
'content', 'db', 'denom', 'denominator', 'derivative', 'divides', 'dump',
'dumps', 'factor', 'floor', 'gamma', 'gcd', 'global_height',
'global_height_arch', 'global_height_non_arch', 'height', 'imag',
'inverse_mod', 'is_S_integral', 'is_S_unit', 'is_idempotent',
'is_integer', 'is_integral', 'is_nilpotent', 'is_norm', 'is_nth_power',
'is_one', 'is_padic_square', 'is_perfect_power', 'is_square', 'is_unit',
'is_zero', 'lcm', 'list', 'local_height', 'local_height_arch', 'minpoly',
'mod', 'mod_ui', 'multiplicative_order', 'n', 'norm', 'nth_root', 'numer',
'numerator', 'numerical_approx', 'ord', 'order', 'parent',
'partial_fraction_decomposition', 'period', 'prime_to_S_part', 'quo_rem',
'real', 'relative_norm', 'rename', 'reset_name', 'round', 'save', 'sign',
'sqrt', 'sqrt_approx', 'squarefree_part', 'str', 'subs', 'substitute',
'support', 'trace', 'val_unit', 'valuation', 'version', 'xgcd']
**********************************************************************
File "src/sage/structure/element.pyx", line 359, in
sage.structure.element.Element.__dir__
Failed example:
1.__dir__()
Expected:
['N', ..., 'is_idempotent', 'is_integral', ...]
Got:
['N', '__abs__', '__add__', '__and__', '__array_interface__',
'__class__', '__cmp__', '__copy__', '__delattr__', '__dict__', '__dir__',
'__div__', '__divmod__', '__doc__', '__eq__', '__float__', '__floordiv__',
'__foo', '__format__', '__ge__', '__getattribute__', '__getstate__',
'__gt__', '__hash__', '__hex__', '__iadd__', '__idiv__', '__imul__',
'__index__', '__init__', '__int__', '__invert__', '__isub__', '__le__',
'__long__', '__lshift__', '__lt__', '__mod__', '__module__', '__mul__',
'__ne__', '__neg__', '__new__', '__nonzero__', '__oct__', '__or__',
'__pos__', '__pow__', '__pyx_vtable__', '__radd__', '__rand__',
'__rdiv__', '__rdivmod__', '__reduce__', '__reduce_ex__', '__repr__',
'__rfloordiv__', '__rlshift__', '__rmod__', '__rmul__', '__ror__',
'__rpow__', '__rrshift__', '__rshift__', '__rsub__', '__rtruediv__',
'__rxor__', '__setattr__', '__setstate__', '__sizeof__', '__str__',
'__sub__', '__subclasshook__', '__truediv__', '__weakref__', '__xor__',
'_act_on_', '_acted_upon_', '_add_', '_add_parent', '_ascii_art_',
'_axiom_', '_axiom_init_', '_bnfisnorm', '_cmp_', '_coeff_repr', '_div_',
'_dummy_attribute', '_exact_log_log2_iter', '_exact_log_mpfi_log',
'_fricas_', '_fricas_init_', '_gap_', '_gap_init_', '_giac_',
'_giac_init_', '_gp_', '_gp_init_', '_iadd_', '_idiv_', '_ilmul_',
'_im_gens_', '_imul_', '_interface_', '_interface_init_',
'_interface_is_cached_', '_is_atomic', '_isub_', '_kash_', '_kash_init_',
'_latex_', '_latex_coeff_repr', '_lcm', '_lmul_', '_macaulay2_',
'_macaulay2_init_', '_magma_init_', '_make_new_with_parent_c', '_maple_',
'_maple_init_', '_mathematica_', '_mathematica_init_', '_mathml_',
'_maxima_', '_maxima_init_', '_maxima_lib_', '_maxima_lib_init_',
'_mpmath_', '_mul_', '_mul_parent', '_neg_', '_octave_', '_octave_init_',
'_pari_', '_pari_init_', '_pow_', '_pow_naive', '_r_init_', '_reduction',
'_repr_', '_richcmp_', '_rmul_', '_rpy_', '_sage_', '_sage_input_',
'_sage_src_lines_', '_set_parent', '_shift_helper', '_singular_',
'_singular_init_', '_sub_', '_sympy_', '_test_category', '_test_eq',
'_test_nonzero_equal', '_test_not_implemented_methods', '_test_pickling',
'_tester', '_valuation', '_xgcd', 'abs', 'additive_order', 'base_extend',
'base_ring', 'binary', 'binomial', 'bits', 'cartesian_product',
'category', 'ceil', 'conjugate', 'coprime_integers', 'crt', 'db',
'degree', 'denominator', 'digits', 'divide_knowing_divisible_by',
'divides', 'divisors', 'dump', 'dumps', 'exact_log', 'exp', 'factor',
'factorial', 'floor', 'gamma', 'gcd', 'global_height', 'imag',
'inverse_mod', 'inverse_of_unit', 'is_idempotent', 'is_integer',
'is_integral', 'is_irreducible', 'is_nilpotent', 'is_norm', 'is_one',
'is_perfect_power', 'is_power', 'is_power_of', 'is_prime',
'is_prime_power', 'is_pseudoprime', 'is_square', 'is_squarefree',
'is_unit', 'is_zero', 'isqrt', 'jacobi', 'kronecker', 'lcm',
'leading_coefficient', 'list', 'log', 'mod', 'multifactorial',
'multiplicative_order', 'n', 'nbits', 'ndigits', 'next_prime',
'next_probable_prime', 'nth_root', 'numerator', 'numerical_approx',
'odd_part', 'ord', 'order', 'ordinal_str', 'parent', 'perfect_power',
'popcount', 'powermod', 'powermodm_ui', 'prime_divisors', 'prime_factors',
'prime_to_m_part', 'quo_rem', 'radical', 'rational_reconstruction',
'real', 'rename', 'reset_name', 'save', 'sign', 'sqrt', 'sqrt_approx',
'sqrtrem', 'squarefree_part', 'str', 'subs', 'substitute', 'support',
'test_bit', 'trailing_zero_bits', 'trial_division', 'val_unit',
'valuation', 'version', 'xgcd']
**********************************************************************
1 item had failures:
2 of 3 in sage.structure.element.Element.__dir__
[433 tests, 2 failures, 5.28 s]
----------------------------------------------------------------------
sage -t --long src/sage/structure/element.pyx # 2 doctests failed
----------------------------------------------------------------------
Total time for all tests: 5.5 seconds
cpu time: 1.7 seconds
cumulative wall time: 5.3 seconds
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/15500#comment:11>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.