Ticket #14287: trac_14287-rebased.patch
File trac_14287-rebased.patch, 53.8 KB (added by , 9 years ago) |
---|
-
doc/en/thematic_tutorials/coercion_and_categories.rst
# HG changeset patch # User Julian Rueth <julian.rueth@gmail.com> # Date 1363506627 0 # Node ID 4364e627f71700242c586b598ba6a3f255de1ea5 # Parent 89049c07c2368bd937b8050d8e092f9c5bb4e35d #14287: split _test_elements_eq so it can be partially overwritten by padics diff --git a/doc/en/thematic_tutorials/coercion_and_categories.rst b/doc/en/thematic_tutorials/coercion_and_categories.rst
a b coincide:: 406 406 407 407 sage: import inspect 408 408 sage: len([s for s in dir(MS1) if inspect.ismethod(getattr(MS1,s,None))]) 409 5 2409 55 410 410 sage: len([s for s in dir(MS2) if inspect.ismethod(getattr(MS2,s,None))]) 411 7 4411 77 412 412 sage: MS1.__class__ is MS2.__class__ 413 413 True 414 414 … … Here are the tests that form the test su 1471 1471 '_test_characteristic_fields', 1472 1472 '_test_distributivity', 1473 1473 '_test_elements', 1474 '_test_elements_eq', 1475 '_test_one', 1476 '_test_prod', 1474 '_test_elements_eq_reflexive', 1475 '_test_elements_eq_symmetric', 1476 '_test_elements_eq_transitive', 1477 '_test_elements_neq', 1478 '_test_one', '_test_prod', 1477 1479 '_test_some_elements', 1478 1480 '_test_zero'] 1479 1481 … … Let us see what tests are actually perfo 1516 1518 running ._test_not_implemented_methods() . . . pass 1517 1519 running ._test_pickling() . . . pass 1518 1520 pass 1519 running ._test_elements_eq() . . . pass 1521 running ._test_elements_eq_reflexive() . . . pass 1522 running ._test_elements_eq_symmetric() . . . pass 1523 running ._test_elements_eq_transitive() . . . pass 1524 running ._test_elements_neq() . . . pass 1520 1525 running ._test_eq() . . . pass 1521 1526 running ._test_not_implemented_methods() . . . pass 1522 1527 running ._test_one() . . . pass … … interesting. 1678 1683 running ._test_not_implemented_methods() . . . pass 1679 1684 running ._test_pickling() . . . pass 1680 1685 pass 1681 running ._test_elements_eq() . . . pass 1686 running ._test_elements_eq_reflexive() . . . pass 1687 running ._test_elements_eq_symmetric() . . . pass 1688 running ._test_elements_eq_transitive() . . . pass 1689 running ._test_elements_neq() . . . pass 1682 1690 running ._test_eq() . . . pass 1683 1691 running ._test_not_implemented_methods() . . . pass 1684 1692 running ._test_one() . . . pass -
sage/algebras/letterplace/free_algebra_letterplace.pyx
diff --git a/sage/algebras/letterplace/free_algebra_letterplace.pyx b/sage/algebras/letterplace/free_algebra_letterplace.pyx
a b cdef class FreeAlgebra_letterplace(Algeb 253 253 running ._test_not_implemented_methods() . . . pass 254 254 running ._test_pickling() . . . pass 255 255 pass 256 running ._test_elements_eq() . . . pass 256 running ._test_elements_eq_reflexive() . . . pass 257 running ._test_elements_eq_symmetric() . . . pass 258 running ._test_elements_eq_transitive() . . . pass 259 running ._test_elements_neq() . . . pass 257 260 running ._test_eq() . . . pass 258 261 running ._test_not_implemented_methods() . . . pass 259 262 running ._test_one() . . . pass -
sage/categories/algebras_with_basis.py
diff --git a/sage/categories/algebras_with_basis.py b/sage/categories/algebras_with_basis.py
a b class AlgebrasWithBasis(Category_over_ba 72 72 running ._test_not_implemented_methods() . . . pass 73 73 running ._test_pickling() . . . pass 74 74 pass 75 running ._test_elements_eq() . . . pass 75 running ._test_elements_eq_reflexive() . . . pass 76 running ._test_elements_eq_symmetric() . . . pass 77 running ._test_elements_eq_transitive() . . . pass 78 running ._test_elements_neq() . . . pass 76 79 running ._test_eq() . . . pass 77 80 running ._test_not_implemented_methods() . . . pass 78 81 running ._test_one() . . . pass -
sage/categories/classical_crystals.py
diff --git a/sage/categories/classical_crystals.py b/sage/categories/classical_crystals.py
a b class ClassicalCrystals(Category_singlet 43 43 running ._test_pickling() . . . pass 44 44 running ._test_stembridge_local_axioms() . . . pass 45 45 pass 46 running ._test_elements_eq() . . . pass 46 running ._test_elements_eq_reflexive() . . . pass 47 running ._test_elements_eq_symmetric() . . . pass 48 running ._test_elements_eq_transitive() . . . pass 49 running ._test_elements_neq() . . . pass 47 50 running ._test_enumerated_set_contains() . . . pass 48 51 running ._test_enumerated_set_iter_cardinality() . . . pass 49 52 running ._test_enumerated_set_iter_list() . . . pass … … class ClassicalCrystals(Category_singlet 282 285 running ._test_pickling() . . . pass 283 286 running ._test_stembridge_local_axioms() . . . pass 284 287 pass 285 running ._test_elements_eq() . . . pass 288 running ._test_elements_eq_reflexive() . . . pass 289 running ._test_elements_eq_symmetric() . . . pass 290 running ._test_elements_eq_transitive() . . . pass 291 running ._test_elements_neq() . . . pass 286 292 running ._test_enumerated_set_contains() . . . pass 287 293 running ._test_enumerated_set_iter_cardinality() . . . pass 288 294 running ._test_enumerated_set_iter_list() . . . pass … … class ClassicalCrystals(Category_singlet 304 310 running ._test_pickling() . . . pass 305 311 running ._test_stembridge_local_axioms() . . . pass 306 312 pass 307 running ._test_elements_eq() . . . pass 313 running ._test_elements_eq_reflexive() . . . pass 314 running ._test_elements_eq_symmetric() . . . pass 315 running ._test_elements_eq_transitive() . . . pass 316 running ._test_elements_neq() . . . pass 308 317 running ._test_enumerated_set_contains() . . . pass 309 318 running ._test_enumerated_set_iter_cardinality() . . . pass 310 319 running ._test_enumerated_set_iter_list() . . . pass … … class ClassicalCrystals(Category_singlet 342 351 running ._test_an_element() . . . pass 343 352 running ._test_category() . . . pass 344 353 running ._test_elements() . . . 345 Running the test suite of self.an_element()354 Running the test suite of self.an_element() 346 355 running ._test_category() . . . pass 347 356 running ._test_eq() . . . pass 348 357 running ._test_not_implemented_methods() . . . pass 349 358 running ._test_pickling() . . . pass 350 359 running ._test_stembridge_local_axioms() . . . pass 351 360 pass 352 running ._test_elements_eq() . . . pass 361 running ._test_elements_eq_reflexive() . . . pass 362 running ._test_elements_eq_symmetric() . . . pass 363 running ._test_elements_eq_transitive() . . . pass 364 running ._test_elements_neq() . . . pass 353 365 running ._test_enumerated_set_contains() . . . pass 354 366 running ._test_enumerated_set_iter_cardinality() . . . pass 355 367 running ._test_enumerated_set_iter_list() . . . pass -
sage/categories/coxeter_groups.py
diff --git a/sage/categories/coxeter_groups.py b/sage/categories/coxeter_groups.py
a b class CoxeterGroups(Category_singleton): 82 82 running ._test_not_implemented_methods() . . . pass 83 83 running ._test_pickling() . . . pass 84 84 pass 85 running ._test_elements_eq() . . . pass 85 running ._test_elements_eq_reflexive() . . . pass 86 running ._test_elements_eq_symmetric() . . . pass 87 running ._test_elements_eq_transitive() . . . pass 88 running ._test_elements_neq() . . . pass 86 89 running ._test_enumerated_set_contains() . . . pass 87 90 running ._test_enumerated_set_iter_cardinality() . . . pass 88 91 running ._test_enumerated_set_iter_list() . . . pass -
sage/categories/crystals.py
diff --git a/sage/categories/crystals.py b/sage/categories/crystals.py
a b class Crystals(Category_singleton): 68 68 running ._test_pickling() . . . pass 69 69 running ._test_stembridge_local_axioms() . . . pass 70 70 pass 71 running ._test_elements_eq() . . . pass 71 running ._test_elements_eq_reflexive() . . . pass 72 running ._test_elements_eq_symmetric() . . . pass 73 running ._test_elements_eq_transitive() . . . pass 74 running ._test_elements_neq() . . . pass 72 75 running ._test_enumerated_set_contains() . . . pass 73 76 running ._test_enumerated_set_iter_cardinality() . . . pass 74 77 running ._test_enumerated_set_iter_list() . . . pass -
sage/categories/examples/commutative_additive_monoids.py
diff --git a/sage/categories/examples/commutative_additive_monoids.py b/sage/categories/examples/commutative_additive_monoids.py
a b class FreeCommutativeAdditiveMonoid(Free 42 42 running ._test_additive_associativity() . . . pass 43 43 running ._test_an_element() . . . pass 44 44 running ._test_category() . . . pass 45 running ._test_elements() . . . 45 running ._test_elements() . . . 46 46 Running the test suite of self.an_element() 47 47 running ._test_category() . . . pass 48 48 running ._test_eq() . . . pass … … class FreeCommutativeAdditiveMonoid(Free 50 50 running ._test_not_implemented_methods() . . . pass 51 51 running ._test_pickling() . . . pass 52 52 pass 53 running ._test_elements_eq() . . . pass 53 running ._test_elements_eq_reflexive() . . . pass 54 running ._test_elements_eq_symmetric() . . . pass 55 running ._test_elements_eq_transitive() . . . pass 56 running ._test_elements_neq() . . . pass 54 57 running ._test_eq() . . . pass 55 58 running ._test_not_implemented_methods() . . . pass 56 59 running ._test_pickling() . . . pass -
sage/categories/examples/commutative_additive_semigroups.py
diff --git a/sage/categories/examples/commutative_additive_semigroups.py b/sage/categories/examples/commutative_additive_semigroups.py
a b class FreeCommutativeAdditiveSemigroup(U 51 51 running ._test_not_implemented_methods() . . . pass 52 52 running ._test_pickling() . . . pass 53 53 pass 54 running ._test_elements_eq() . . . pass 54 running ._test_elements_eq_reflexive() . . . pass 55 running ._test_elements_eq_symmetric() . . . pass 56 running ._test_elements_eq_transitive() . . . pass 57 running ._test_elements_neq() . . . pass 55 58 running ._test_eq() . . . pass 56 59 running ._test_not_implemented_methods() . . . pass 57 60 running ._test_pickling() . . . pass -
sage/categories/examples/crystals.py
diff --git a/sage/categories/examples/crystals.py b/sage/categories/examples/crystals.py
a b class HighestWeightCrystalOfTypeA(Unique 64 64 running ._test_pickling() . . . pass 65 65 running ._test_stembridge_local_axioms() . . . pass 66 66 pass 67 running ._test_elements_eq() . . . pass 67 running ._test_elements_eq_reflexive() . . . pass 68 running ._test_elements_eq_symmetric() . . . pass 69 running ._test_elements_eq_transitive() . . . pass 70 running ._test_elements_neq() . . . pass 68 71 running ._test_enumerated_set_contains() . . . pass 69 72 running ._test_enumerated_set_iter_cardinality() . . . pass 70 73 running ._test_enumerated_set_iter_list() . . . pass -
sage/categories/examples/facade_sets.py
diff --git a/sage/categories/examples/facade_sets.py b/sage/categories/examples/facade_sets.py
a b class PositiveIntegerMonoid(UniqueRepres 44 44 running ._test_not_implemented_methods() . . . pass 45 45 running ._test_pickling() . . . pass 46 46 pass 47 running ._test_elements_eq() . . . pass 47 running ._test_elements_eq_reflexive() . . . pass 48 running ._test_elements_eq_symmetric() . . . pass 49 running ._test_elements_eq_transitive() . . . pass 50 running ._test_elements_neq() . . . pass 48 51 running ._test_eq() . . . pass 49 52 running ._test_not_implemented_methods() . . . pass 50 53 running ._test_one() . . . pass … … class IntegersCompletion(UniqueRepresent 139 142 running ._test_not_implemented_methods() . . . pass 140 143 running ._test_pickling() . . . pass 141 144 pass 142 running ._test_elements_eq() . . . pass 145 running ._test_elements_eq_reflexive() . . . pass 146 running ._test_elements_eq_symmetric() . . . pass 147 running ._test_elements_eq_transitive() . . . pass 148 running ._test_elements_neq() . . . pass 143 149 running ._test_eq() . . . pass 144 150 running ._test_not_implemented_methods() . . . pass 145 151 running ._test_pickling() . . . pass -
sage/categories/examples/finite_coxeter_groups.py
diff --git a/sage/categories/examples/finite_coxeter_groups.py b/sage/categories/examples/finite_coxeter_groups.py
a b class DihedralGroup(UniqueRepresentation 77 77 running ._test_not_implemented_methods() . . . pass 78 78 running ._test_pickling() . . . pass 79 79 pass 80 running ._test_elements_eq() . . . pass 80 running ._test_elements_eq_reflexive() . . . pass 81 running ._test_elements_eq_symmetric() . . . pass 82 running ._test_elements_eq_transitive() . . . pass 83 running ._test_elements_neq() . . . pass 81 84 running ._test_enumerated_set_contains() . . . pass 82 85 running ._test_enumerated_set_iter_cardinality() . . . pass 83 86 running ._test_enumerated_set_iter_list() . . . pass -
sage/categories/examples/finite_enumerated_sets.py
diff --git a/sage/categories/examples/finite_enumerated_sets.py b/sage/categories/examples/finite_enumerated_sets.py
a b class Example(UniqueRepresentation, Pare 47 47 running ._test_not_implemented_methods() . . . pass 48 48 running ._test_pickling() . . . pass 49 49 pass 50 running ._test_elements_eq() . . . pass 50 running ._test_elements_eq_reflexive() . . . pass 51 running ._test_elements_eq_symmetric() . . . pass 52 running ._test_elements_eq_transitive() . . . pass 53 running ._test_elements_neq() . . . pass 51 54 running ._test_enumerated_set_contains() . . . pass 52 55 running ._test_enumerated_set_iter_cardinality() . . . pass 53 56 running ._test_enumerated_set_iter_list() . . . pass -
sage/categories/examples/finite_monoids.py
diff --git a/sage/categories/examples/finite_monoids.py b/sage/categories/examples/finite_monoids.py
a b class IntegerModMonoid(UniqueRepresentat 44 44 running ._test_not_implemented_methods() . . . pass 45 45 running ._test_pickling() . . . pass 46 46 pass 47 running ._test_elements_eq() . . . pass 47 running ._test_elements_eq_reflexive() . . . pass 48 running ._test_elements_eq_symmetric() . . . pass 49 running ._test_elements_eq_transitive() . . . pass 50 running ._test_elements_neq() . . . pass 48 51 running ._test_enumerated_set_contains() . . . pass 49 52 running ._test_enumerated_set_iter_cardinality() . . . pass 50 53 running ._test_enumerated_set_iter_list() . . . pass -
sage/categories/examples/finite_semigroups.py
diff --git a/sage/categories/examples/finite_semigroups.py b/sage/categories/examples/finite_semigroups.py
a b class LeftRegularBand(UniqueRepresentati 87 87 running ._test_not_implemented_methods() . . . pass 88 88 running ._test_pickling() . . . pass 89 89 pass 90 running ._test_elements_eq() . . . pass 90 running ._test_elements_eq_reflexive() . . . pass 91 running ._test_elements_eq_symmetric() . . . pass 92 running ._test_elements_eq_transitive() . . . pass 93 running ._test_elements_neq() . . . pass 91 94 running ._test_enumerated_set_contains() . . . pass 92 95 running ._test_enumerated_set_iter_cardinality() . . . pass 93 96 running ._test_enumerated_set_iter_list() . . . pass -
sage/categories/examples/finite_weyl_groups.py
diff --git a/sage/categories/examples/finite_weyl_groups.py b/sage/categories/examples/finite_weyl_groups.py
a b class SymmetricGroup(UniqueRepresentatio 58 58 running ._test_not_implemented_methods() . . . pass 59 59 running ._test_pickling() . . . pass 60 60 pass 61 running ._test_elements_eq() . . . pass 61 running ._test_elements_eq_reflexive() . . . pass 62 running ._test_elements_eq_symmetric() . . . pass 63 running ._test_elements_eq_transitive() . . . pass 64 running ._test_elements_neq() . . . pass 62 65 running ._test_enumerated_set_contains() . . . pass 63 66 running ._test_enumerated_set_iter_cardinality() . . . pass 64 67 running ._test_enumerated_set_iter_list() . . . pass -
sage/categories/examples/infinite_enumerated_sets.py
diff --git a/sage/categories/examples/infinite_enumerated_sets.py b/sage/categories/examples/infinite_enumerated_sets.py
a b class NonNegativeIntegers(UniqueRepresen 60 60 running ._test_not_implemented_methods() . . . pass 61 61 running ._test_pickling() . . . pass 62 62 pass 63 running ._test_elements_eq() . . . pass 63 running ._test_elements_eq_reflexive() . . . pass 64 running ._test_elements_eq_symmetric() . . . pass 65 running ._test_elements_eq_transitive() . . . pass 66 running ._test_elements_neq() . . . pass 64 67 running ._test_enumerated_set_contains() . . . pass 65 68 running ._test_enumerated_set_iter_cardinality() . . . pass 66 69 running ._test_enumerated_set_iter_list() . . . pass -
sage/categories/examples/monoids.py
diff --git a/sage/categories/examples/monoids.py b/sage/categories/examples/monoids.py
a b class FreeMonoid(FreeSemigroup): 51 51 running ._test_not_implemented_methods() . . . pass 52 52 running ._test_pickling() . . . pass 53 53 pass 54 running ._test_elements_eq() . . . pass 54 running ._test_elements_eq_reflexive() . . . pass 55 running ._test_elements_eq_symmetric() . . . pass 56 running ._test_elements_eq_transitive() . . . pass 57 running ._test_elements_neq() . . . pass 55 58 running ._test_eq() . . . pass 56 59 running ._test_not_implemented_methods() . . . pass 57 60 running ._test_one() . . . pass -
sage/categories/examples/posets.py
diff --git a/sage/categories/examples/posets.py b/sage/categories/examples/posets.py
a b class FiniteSetsOrderedByInclusion(Uniqu 38 38 running ._test_not_implemented_methods() . . . pass 39 39 running ._test_pickling() . . . pass 40 40 pass 41 running ._test_elements_eq() . . . pass 41 running ._test_elements_eq_reflexive() . . . pass 42 running ._test_elements_eq_symmetric() . . . pass 43 running ._test_elements_eq_transitive() . . . pass 44 running ._test_elements_neq() . . . pass 42 45 running ._test_eq() . . . pass 43 46 running ._test_not_implemented_methods() . . . pass 44 47 running ._test_pickling() . . . pass -
sage/categories/examples/semigroups.py
diff --git a/sage/categories/examples/semigroups.py b/sage/categories/examples/semigroups.py
a b class LeftZeroSemigroup(UniqueRepresenta 53 53 running ._test_not_implemented_methods() . . . pass 54 54 running ._test_pickling() . . . pass 55 55 pass 56 running ._test_elements_eq() . . . pass 56 running ._test_elements_eq_reflexive() . . . pass 57 running ._test_elements_eq_symmetric() . . . pass 58 running ._test_elements_eq_transitive() . . . pass 59 running ._test_elements_neq() . . . pass 57 60 running ._test_eq() . . . pass 58 61 running ._test_not_implemented_methods() . . . pass 59 62 running ._test_pickling() . . . pass … … class FreeSemigroup(UniqueRepresentation 181 184 running ._test_not_implemented_methods() . . . pass 182 185 running ._test_pickling() . . . pass 183 186 pass 184 running ._test_elements_eq() . . . pass 187 running ._test_elements_eq_reflexive() . . . pass 188 running ._test_elements_eq_symmetric() . . . pass 189 running ._test_elements_eq_transitive() . . . pass 190 running ._test_elements_neq() . . . pass 185 191 running ._test_eq() . . . pass 186 192 running ._test_not_implemented_methods() . . . pass 187 193 running ._test_pickling() . . . pass … … class QuotientOfLeftZeroSemigroup(Unique 351 357 running ._test_not_implemented_methods() . . . pass 352 358 running ._test_pickling() . . . pass 353 359 pass 354 running ._test_elements_eq() . . . pass 360 running ._test_elements_eq_reflexive() . . . pass 361 running ._test_elements_eq_symmetric() . . . pass 362 running ._test_elements_eq_transitive() . . . pass 363 running ._test_elements_neq() . . . pass 355 364 running ._test_eq() . . . pass 356 365 running ._test_not_implemented_methods() . . . pass 357 366 running ._test_pickling() . . . pass … … class IncompleteSubquotientSemigroup(Uni 569 578 running ._test_not_implemented_methods() . . . pass 570 579 running ._test_pickling() . . . pass 571 580 pass 572 running ._test_elements_eq() . . . pass 581 running ._test_elements_eq_reflexive() . . . pass 582 running ._test_elements_eq_symmetric() . . . pass 583 running ._test_elements_eq_transitive() . . . pass 584 running ._test_elements_neq() . . . pass 573 585 running ._test_eq() . . . pass 574 586 running ._test_not_implemented_methods() . . . fail 575 587 Traceback (most recent call last): -
sage/categories/examples/semigroups_cython.pyx
diff --git a/sage/categories/examples/semigroups_cython.pyx b/sage/categories/examples/semigroups_cython.pyx
a b class LeftZeroSemigroup(LeftZeroSemigrou 217 217 running ._test_not_implemented_methods() . . . pass 218 218 running ._test_pickling() . . . pass 219 219 pass 220 running ._test_elements_eq() . . . pass 220 running ._test_elements_eq_reflexive() . . . pass 221 running ._test_elements_eq_symmetric() . . . pass 222 running ._test_elements_eq_transitive() . . . pass 223 running ._test_elements_neq() . . . pass 221 224 running ._test_eq() . . . pass 222 225 running ._test_not_implemented_methods() . . . pass 223 226 running ._test_pickling() . . . pass -
sage/categories/examples/sets_cat.py
diff --git a/sage/categories/examples/sets_cat.py b/sage/categories/examples/sets_cat.py
a b class PrimeNumbers(UniqueRepresentation, 67 67 running ._test_not_implemented_methods() . . . pass 68 68 running ._test_pickling() . . . pass 69 69 pass 70 running ._test_elements_eq() . . . pass 70 running ._test_elements_eq_reflexive() . . . pass 71 running ._test_elements_eq_symmetric() . . . pass 72 running ._test_elements_eq_transitive() . . . pass 73 running ._test_elements_neq() . . . pass 71 74 running ._test_eq() . . . pass 72 75 running ._test_not_implemented_methods() . . . pass 73 76 running ._test_pickling() . . . pass … … class PrimeNumbers_Inherits(PrimeNumbers 345 348 running ._test_not_implemented_methods() . . . pass 346 349 running ._test_pickling() . . . pass 347 350 pass 348 running ._test_elements_eq() . . . pass 351 running ._test_elements_eq_reflexive() . . . pass 352 running ._test_elements_eq_symmetric() . . . pass 353 running ._test_elements_eq_transitive() . . . pass 354 running ._test_elements_neq() . . . pass 349 355 running ._test_eq() . . . pass 350 356 running ._test_not_implemented_methods() . . . pass 351 357 running ._test_pickling() . . . pass … … class PrimeNumbers_Facade(PrimeNumbers_A 625 631 running ._test_not_implemented_methods() . . . pass 626 632 running ._test_pickling() . . . pass 627 633 pass 628 running ._test_elements_eq() . . . pass 634 running ._test_elements_eq_reflexive() . . . pass 635 running ._test_elements_eq_symmetric() . . . pass 636 running ._test_elements_eq_transitive() . . . pass 637 running ._test_elements_neq() . . . pass 629 638 running ._test_eq() . . . pass 630 639 running ._test_not_implemented_methods() . . . pass 631 640 running ._test_pickling() . . . pass -
sage/categories/finite_crystals.py
diff --git a/sage/categories/finite_crystals.py b/sage/categories/finite_crystals.py
a b class FiniteCrystals(Category): 42 42 running ._test_pickling() . . . pass 43 43 running ._test_stembridge_local_axioms() . . . pass 44 44 pass 45 running ._test_elements_eq() . . . pass 45 running ._test_elements_eq_reflexive() . . . pass 46 running ._test_elements_eq_symmetric() . . . pass 47 running ._test_elements_eq_transitive() . . . pass 48 running ._test_elements_neq() . . . pass 46 49 running ._test_enumerated_set_contains() . . . pass 47 50 running ._test_enumerated_set_iter_cardinality() . . . pass 48 51 running ._test_enumerated_set_iter_list() . . . pass -
sage/categories/finite_permutation_groups.py
diff --git a/sage/categories/finite_permutation_groups.py b/sage/categories/finite_permutation_groups.py
a b class FinitePermutationGroups(Category): 49 49 running ._test_not_implemented_methods() . . . pass 50 50 running ._test_pickling() . . . pass 51 51 pass 52 running ._test_elements_eq() . . . pass 52 running ._test_elements_eq_reflexive() . . . pass 53 running ._test_elements_eq_symmetric() . . . pass 54 running ._test_elements_eq_transitive() . . . pass 55 running ._test_elements_neq() . . . pass 53 56 running ._test_enumerated_set_contains() . . . pass 54 57 running ._test_enumerated_set_iter_cardinality() . . . pass 55 58 running ._test_enumerated_set_iter_list() . . . pass -
sage/categories/finite_weyl_groups.py
diff --git a/sage/categories/finite_weyl_groups.py b/sage/categories/finite_weyl_groups.py
a b class FiniteWeylGroups(Category): 41 41 running ._test_not_implemented_methods() . . . pass 42 42 running ._test_pickling() . . . pass 43 43 pass 44 running ._test_elements_eq() . . . pass 44 running ._test_elements_eq_reflexive() . . . pass 45 running ._test_elements_eq_symmetric() . . . pass 46 running ._test_elements_eq_transitive() . . . pass 47 running ._test_elements_neq() . . . pass 45 48 running ._test_enumerated_set_contains() . . . pass 46 49 running ._test_enumerated_set_iter_cardinality() . . . pass 47 50 running ._test_enumerated_set_iter_list() . . . pass -
sage/categories/highest_weight_crystals.py
diff --git a/sage/categories/highest_weight_crystals.py b/sage/categories/highest_weight_crystals.py
a b class HighestWeightCrystals(Category_sin 45 45 running ._test_pickling() . . . pass 46 46 running ._test_stembridge_local_axioms() . . . pass 47 47 pass 48 running ._test_elements_eq() . . . pass 48 running ._test_elements_eq_reflexive() . . . pass 49 running ._test_elements_eq_symmetric() . . . pass 50 running ._test_elements_eq_transitive() . . . pass 51 running ._test_elements_neq() . . . pass 49 52 running ._test_enumerated_set_contains() . . . pass 50 53 running ._test_enumerated_set_iter_cardinality() . . . pass 51 54 running ._test_enumerated_set_iter_list() . . . pass -
sage/categories/hopf_algebras_with_basis.py
diff --git a/sage/categories/hopf_algebras_with_basis.py b/sage/categories/hopf_algebras_with_basis.py
a b class HopfAlgebrasWithBasis(Category_ove 82 82 running ._test_not_implemented_methods() . . . pass 83 83 running ._test_pickling() . . . pass 84 84 pass 85 running ._test_elements_eq() . . . pass 85 running ._test_elements_eq_reflexive() . . . pass 86 running ._test_elements_eq_symmetric() . . . pass 87 running ._test_elements_eq_transitive() . . . pass 88 running ._test_elements_neq() . . . pass 86 89 running ._test_eq() . . . pass 87 90 running ._test_not_implemented_methods() . . . pass 88 91 running ._test_one() . . . pass -
sage/categories/primer.py
diff --git a/sage/categories/primer.py b/sage/categories/primer.py
a b element of the parent?):: 479 479 running ._test_not_implemented_methods() . . . pass 480 480 running ._test_pickling() . . . pass 481 481 pass 482 running ._test_elements_eq() . . . pass 482 running ._test_elements_eq_reflexive() . . . pass 483 running ._test_elements_eq_symmetric() . . . pass 484 running ._test_elements_eq_transitive() . . . pass 485 running ._test_elements_neq() . . . pass 483 486 running ._test_enumerated_set_contains() . . . pass 484 487 running ._test_enumerated_set_iter_cardinality() . . . pass 485 488 running ._test_enumerated_set_iter_list() . . . pass -
sage/categories/sets_cat.py
diff --git a/sage/categories/sets_cat.py b/sage/categories/sets_cat.py
a b from sage.categories.with_realizations i 32 32 33 33 lazy_import('sage.sets.cartesian_product', 'CartesianProduct') 34 34 35 def print_compare(x, y): 36 """ 37 Helper method used in 38 :meth:`Sets.ParentMethods._test_elements_eq_symmetric`, 39 :meth:`Sets.ParentMethods._test_elements_eq_tranisitive`. 40 41 INPUT: 42 43 - ``x`` -- an element 44 45 - ``y`` -- an element 46 47 EXAMPLES:: 48 49 sage: from sage.categories.sets_cat import print_compare 50 sage: print_compare(1,2) 51 1 != 2 52 sage: print_compare(1,1) 53 1 == 1 54 55 """ 56 if x == y: 57 return LazyFormat("%s == %s")%(x, y) 58 else: 59 return LazyFormat("%s != %s")%(x, y) 60 35 61 class EmptySetError(ValueError): 36 62 """ 37 63 Exception raised when some operation can't be performed on the empty set. … … class Sets(Category_singleton): 110 136 running ._test_not_implemented_methods() . . . pass 111 137 running ._test_pickling() . . . pass 112 138 pass 113 running ._test_elements_eq() . . . pass 139 running ._test_elements_eq_reflexive() . . . pass 140 running ._test_elements_eq_symmetric() . . . pass 141 running ._test_elements_eq_transitive() . . . pass 142 running ._test_elements_neq() . . . pass 114 143 running ._test_eq() . . . pass 115 144 running ._test_not_implemented_methods() . . . pass 116 145 running ._test_pickling() . . . pass … … class Sets(Category_singleton): 344 373 345 374 TESTS:: 346 375 347 sage: P = sage.categories.examples.sets_cat.PrimeNumbers() 376 sage: from sage.categories.examples.sets_cat import PrimeNumbers 377 sage: P = PrimeNumbers() 348 378 sage: 12 in P 349 379 False 350 380 sage: P(5) in P … … class Sets(Category_singleton): 474 504 raise_on_failure = is_sub_testsuite) 475 505 tester.info(tester._prefix+" ", newline = False) 476 506 507 def _test_elements_eq_reflexive(self, **options): 508 """ 509 Run generic tests on the equality of elements. 477 510 478 479 def _test_elements_eq(self, **options): 480 """ 481 Runs generic tests on the equality of elements. 482 483 In particular, this tests that ``==`` is reflexive, 484 symmetric, and transitive on some_elements of ``self`` 485 together with ``0`` and ``None``. This also tests the 486 consistency with inequality tests with ``!=``. 511 Test that ``==`` is reflexive. 487 512 488 513 See also: :class:`TestSuite`. 489 514 490 515 EXAMPLES:: 491 516 492 517 sage: C = Sets().example() 493 sage: C._test_elements_eq ()518 sage: C._test_elements_eq_reflexive() 494 519 495 Let us test the consistency of a broken equality or inequality::520 We try a non-reflexive equality:: 496 521 497 522 sage: P = Sets().example("wrapper") 498 sage: P._test_elements_eq() 523 sage: P._test_elements_eq_reflexive() 524 sage: eq = P.element_class.__eq__ 525 526 sage: P.element_class.__eq__ = (lambda x, y: 527 ... False if eq(x, P(47)) and eq(y, P(47)) else eq(x, y)) 528 sage: P._test_elements_eq_reflexive() 529 Traceback (most recent call last): 530 ... 531 AssertionError: 47 != 47 532 533 We restore ``P.element_class`` in a proper state for further tests:: 534 535 sage: P.element_class.__eq__ = eq 536 537 """ 538 tester = self._tester(**options) 539 S = list(tester.some_elements()) + [None, 0] 540 for x in S: 541 tester.assertEqual(x, x) 542 543 def _test_elements_eq_symmetric(self, **options): 544 """ 545 Run generic tests on the equality of elements. 546 547 This tests that ``==`` is symmetric. 548 549 See also: :class:`TestSuite`. 550 551 EXAMPLES:: 552 553 sage: C = Sets().example() 554 sage: C._test_elements_eq_symmetric() 555 556 We test a non symmetric equality:: 557 558 sage: P = Sets().example("wrapper") 559 sage: P._test_elements_eq_symmetric() 560 sage: eq = P.element_class.__eq__ 561 562 sage: def non_sym_eq(x, y): 563 ... if not y in P: return False 564 ... elif eq(x, P(47)) and eq(y, P(53)): return True 565 ... else: return eq(x, y) 566 sage: P.element_class.__eq__ = non_sym_eq 567 sage: P._test_elements_eq_symmetric() 568 Traceback (most recent call last): 569 ... 570 AssertionError: non symmetric equality: 47 == 53 but 53 != 47 571 572 We restore ``P.element_class`` in a proper state for further tests:: 573 574 sage: P.element_class.__eq__ = eq 575 576 """ 577 tester = self._tester(**options) 578 S = list(tester.some_elements()) + [None, 0] 579 n = tester._max_runs 580 from sage.combinat.cartesian_product import CartesianProduct 581 S = CartesianProduct(S,S) 582 if len(S) > n: 583 from random import sample 584 S = sample(S, n) 585 586 for x, y in S: 587 tester.assertEqual(x==y, y==x, 588 LazyFormat("non symmetric equality: %s but %s")%( 589 print_compare(x, y), print_compare(y, x))) 590 591 def _test_elements_eq_transitive(self, **options): 592 """ 593 Run generic tests on the equality of elements. 594 595 Test that ``==`` is transitive. 596 597 See also: :class:`TestSuite`. 598 599 EXAMPLES:: 600 601 sage: C = Sets().example() 602 sage: C._test_elements_eq_transitive() 603 604 We test a non transitive equality:: 605 606 sage: R = Zp(3) 607 sage: Sets().ParentMethods._test_elements_eq_transitive.im_func(R,elements=[R(3,2),R(3,1),R(0)]) 608 Traceback (most recent call last): 609 ... 610 AssertionError: non transitive equality: 611 3 + O(3^2) == O(3) and O(3) == 0 but 3 + O(3^2) != 0 612 613 """ 614 tester = self._tester(**options) 615 S = list(tester.some_elements()) 616 n = tester._max_runs 617 if (len(S)+2)**3 <= n: 618 S = list(S) + [None, 0] 619 else: 620 from random import sample 621 from sage.rings.integer import Integer 622 S = sample(S, Integer(n).nth_root(3,truncate_mode=1)[0] - 2) + [None, 0] 623 624 for x in S: 625 for y in S: 626 if not x == y: continue 627 for z in S: 628 if not y == z: continue 629 tester.assertTrue(x == z, 630 LazyFormat("non transitive equality:\n" 631 "%s and %s but %s")%( 632 print_compare(x, y), 633 print_compare(y, z), 634 print_compare(x, z))) 635 636 def _test_elements_neq(self, **options): 637 """ 638 Run generic tests on the equality of elements. 639 640 Test that ``==`` and ``!=`` are consistent. 641 642 See also: :class:`TestSuite`. 643 644 EXAMPLES:: 645 646 sage: C = Sets().example() 647 sage: C._test_elements_neq() 648 649 We try a broken inequality:: 650 651 sage: P = Sets().example("wrapper") 652 sage: P._test_elements_neq() 499 653 sage: ne = P.element_class.__ne__ 500 654 sage: eq = P.element_class.__eq__ 501 655 502 We first try a broken inequality::503 504 656 sage: P.element_class.__ne__ = lambda x, y: False 505 sage: P._test_elements_ eq()657 sage: P._test_elements_neq() 506 658 Traceback (most recent call last): 507 659 ... 508 660 AssertionError: __eq__ and __ne__ inconsistency: … … class Sets(Category_singleton): 510 662 511 663 sage: P.element_class.__ne__ = lambda x, y: not(x == y) 512 664 513 We then try a non-reflexive equality::514 515 sage: P.element_class.__eq__ = (lambda x, y:516 ... False if eq(x, P(47)) and eq(y, P(47)) else eq(x, y))517 sage: P._test_elements_eq()518 Traceback (most recent call last):519 ...520 AssertionError: non reflexive equality: 47 != 47521 522 What about a non symmetric equality::523 524 sage: def non_sym_eq(x, y):525 ... if not y in P: return False526 ... elif eq(x, P(47)) and eq(y, P(53)): return True527 ... else: return eq(x, y)528 sage: P.element_class.__eq__ = non_sym_eq529 sage: P._test_elements_eq()530 Traceback (most recent call last):531 ...532 AssertionError: non symmetric equality: 53 != 47 but 47 == 53533 534 And finally a non transitive equality::535 536 sage: def non_sym_eq(x, y):537 ... if not y in P: return False538 ... elif eq(x, P(47)) and eq(y, P(53)): return True539 ... elif eq(x, P(53)) and eq(y, P(47)): return True540 ... elif eq(x, P(47)) and eq(y, P(59)): return True541 ... elif eq(x, P(59)) and eq(y, P(47)): return True542 ... else: return eq(x, y)543 sage: P.element_class.__eq__ = non_sym_eq544 sage: P._test_elements_eq()545 Traceback (most recent call last):546 ...547 AssertionError: non transitive equality:548 53 == 47 and 47 == 59 but 53 != 59549 550 665 We restore ``P.element_class`` in a proper state for further tests:: 551 666 552 667 sage: P.element_class.__ne__ = ne 553 668 sage: P.element_class.__eq__ = eq 554 669 """ 555 670 tester = self._tester(**options) 556 S = list(tester.some_elements()) 557 # Note: we can't expect that all those elements are hashable 671 S = list(tester.some_elements()) + [None, 0] 558 672 n = tester._max_runs 559 673 from sage.combinat.cartesian_product import CartesianProduct 560 from random import sample 561 from sage.rings.integer import Integer 562 if (len(S)+2)**3 <= n: 563 elements = list(S) + [None, 0] 564 else: 565 m = Integer(n).nth_root(3,truncate_mode=1)[0] - 2 566 if m < 0: m = 0 567 elements = sample(S, m) + [None, 0] 674 S = CartesianProduct(S,S) 675 if len(S) > n: 676 from random import sample 677 S = sample(S, n) 568 678 569 equal_eli_elj = {} 570 def print_compare(x, y): 571 if x == y: 572 return LazyFormat("%s == %s")%(x, y) 573 else: 574 return LazyFormat("%s != %s")%(x, y) 575 for i, eli in enumerate(elements): 576 for j, elj in enumerate(elements): 577 equal_eli_elj[i,j] = (eli == elj) 578 tester.assertNotEqual(equal_eli_elj[i,j], eli != elj, 579 LazyFormat("__eq__ and __ne__ inconsistency:\n" 580 " %s == %s returns %s but %s != %s returns %s")%( 581 eli, elj, (eli == elj), eli, elj, (eli != elj))) 582 if i == j: 583 tester.assertTrue(equal_eli_elj[i,i], 584 LazyFormat("non reflexive equality: %s != %s")%(eli,eli)) 585 if i > j: # (j, i) is already computed 586 tester.assertEqual(equal_eli_elj[i,j], equal_eli_elj[j,i], 587 LazyFormat("non symmetric equality: %s but %s")%( 588 print_compare(eli, elj), print_compare(elj, eli))) 589 # check for transitivity 590 nbel = len(elements) 591 for i in range(nbel): 592 for j in range(nbel): 593 if not equal_eli_elj[i,j]: continue 594 for k in range(nbel): 595 if not equal_eli_elj[j,k]: continue 596 tester.assertTrue(equal_eli_elj[i,k], 597 LazyFormat("non transitive equality:\n" 598 "%s and %s but %s")%( 599 print_compare(elements[i], elements[j]), 600 print_compare(elements[j], elements[k]), 601 print_compare(elements[i], elements[k]))) 679 for x,y in S: 680 tester.assertNotEqual(x == y, x != y, 681 LazyFormat("__eq__ and __ne__ inconsistency:\n" 682 " %s == %s returns %s but %s != %s returns %s")%( 683 x, y, (x == y), x, y, (x != y))) 602 684 603 685 def some_elements(self): 604 686 """ -
sage/groups/group.pyx
diff --git a/sage/groups/group.pyx b/sage/groups/group.pyx
a b cdef class Group(Parent): 31 31 32 32 sage: from sage.groups.group import Group 33 33 sage: G = Group() 34 sage: TestSuite(G).run() 35 Failure in _test_an_element: 36 Traceback (most recent call last): 37 ... 38 The following tests failed: 39 _test_an_element, _test_associativity, _test_elements, 40 _test_elements_eq, _test_inverse, _test_one, 41 _test_pickling, _test_prod, _test_some_elements 34 sage: TestSuite(G).run(skip = ["_test_an_element",\ 35 "_test_associativity",\ 36 "_test_elements",\ 37 "_test_elements_eq_reflexive",\ 38 "_test_elements_eq_symmetric",\ 39 "_test_elements_eq_transitive",\ 40 "_test_elements_neq",\ 41 "_test_inverse",\ 42 "_test_one",\ 43 "_test_pickling",\ 44 "_test_prod",\ 45 "_test_some_elements"]) 42 46 """ 43 47 def __init__(self, gens=None, category=None): 44 48 """ -
sage/groups/pari_group.py
diff --git a/sage/groups/pari_group.py b/sage/groups/pari_group.py
a b class PariGroup(Group): 22 22 Caveat: fix those tests and/or document precisely that this is 23 23 an abstract group without explicit elements:: 24 24 25 sage: TestSuite(G).run() 26 Failure in 27 ... 28 The following tests failed: _test_an_element, _test_associativity, _test_elements, _test_elements_eq, _test_enumerated_set_contains, _test_enumerated_set_iter_cardinality, _test_enumerated_set_iter_list, _test_inverse, _test_one, _test_prod, _test_some_elements 25 sage: TestSuite(G).run(skip = ["_test_an_element",\ 26 "_test_associativity",\ 27 "_test_elements",\ 28 "_test_elements_eq_reflexive",\ 29 "_test_elements_eq_symmetric",\ 30 "_test_elements_eq_transitive",\ 31 "_test_elements_neq",\ 32 "_test_enumerated_set_contains",\ 33 "_test_enumerated_set_iter_cardinality",\ 34 "_test_enumerated_set_iter_list",\ 35 "_test_inverse",\ 36 "_test_one",\ 37 "_test_prod",\ 38 "_test_some_elements"]) 29 39 """ 30 40 if not isinstance(x, pari_gen): 31 41 raise TypeError, "x (=%s) must be a PARI gen"%x -
sage/misc/sage_unittest.py
diff --git a/sage/misc/sage_unittest.py b/sage/misc/sage_unittest.py
a b class TestSuite(object): 52 52 running ._test_not_implemented_methods() . . . pass 53 53 running ._test_pickling() . . . pass 54 54 pass 55 running ._test_elements_eq() . . . pass 55 running ._test_elements_eq_reflexive() . . . pass 56 running ._test_elements_eq_symmetric() . . . pass 57 running ._test_elements_eq_transitive() . . . pass 58 running ._test_elements_neq() . . . pass 56 59 running ._test_enumerated_set_contains() . . . pass 57 60 running ._test_enumerated_set_iter_cardinality() . . . pass 58 61 running ._test_enumerated_set_iter_list() . . . pass -
sage/modular/hecke/module.py
diff --git a/sage/modular/hecke/module.py b/sage/modular/hecke/module.py
a b class HeckeModule_free_module(HeckeModul 515 515 516 516 sage: M = sage.modular.hecke.module.HeckeModule_free_module(QQ, 12, -4); M 517 517 <class 'sage.modular.hecke.module.HeckeModule_free_module_with_category'> 518 sage: TestSuite(M).run(skip = ["_test_additive_associativity", "_test_an_element", "_test_elements", "_test_elements_eq", "_test_pickling", "_test_some_elements", "_test_zero", "_test_eq"]) # is this supposed to be an abstract parent without elements? 518 sage: TestSuite(M).run(skip = ["_test_additive_associativity",\ 519 "_test_an_element",\ 520 "_test_elements",\ 521 "_test_elements_eq_reflexive",\ 522 "_test_elements_eq_symmetric",\ 523 "_test_elements_eq_transitive",\ 524 "_test_elements_neq",\ 525 "_test_pickling",\ 526 "_test_some_elements",\ 527 "_test_zero",\ 528 "_test_eq"]) # is this supposed to be an abstract parent without elements? 519 529 """ 520 530 HeckeModule_generic.__init__(self, base_ring, level) 521 531 self.__weight = weight -
sage/rings/ring.pyx
diff --git a/sage/rings/ring.pyx b/sage/rings/ring.pyx
a b cdef class Ring(ParentWithGens): 116 116 running ._test_not_implemented_methods() . . . pass 117 117 running ._test_pickling() . . . pass 118 118 pass 119 running ._test_elements_eq() . . . pass 119 running ._test_elements_eq_reflexive() . . . pass 120 running ._test_elements_eq_symmetric() . . . pass 121 running ._test_elements_eq_transitive() . . . pass 122 running ._test_elements_neq() . . . pass 120 123 running ._test_eq() . . . pass 121 124 running ._test_not_implemented_methods() . . . pass 122 125 running ._test_one() . . . pass -
sage/schemes/generic/projective_space.py
diff --git a/sage/schemes/generic/projective_space.py b/sage/schemes/generic/projective_space.py
a b class ProjectiveSpace_ring(AmbientSpace) 705 705 To: Spectrum of Rational Field 706 706 Defn: Structure map 707 707 708 sage: TestSuite(X).run(skip=["_test_an_element", "_test_elements", "_test_elements_eq", "_test_some_elements"]) 708 sage: TestSuite(X).run(skip=["_test_an_element",\ 709 "_test_elements",\ 710 "_test_elements_eq_reflexive",\ 711 "_test_elements_eq_symmetric",\ 712 "_test_elements_eq_transitive",\ 713 "_test_elements_neq",\ 714 "_test_some_elements"]) 709 715 """ 710 716 from algebraic_scheme import AlgebraicScheme_subscheme_projective 711 717 return AlgebraicScheme_subscheme_projective(self, X) -
sage/schemes/jacobians/abstract_jacobian.py
diff --git a/sage/schemes/jacobians/abstract_jacobian.py b/sage/schemes/jacobians/abstract_jacobian.py
a b class Jacobian_generic(Scheme): 76 76 77 77 Note: this is an abstract parent, so we skip element tests:: 78 78 79 sage: TestSuite(J).run(skip =["_test_an_element", "_test_elements", "_test_elements_eq", "_test_some_elements"]) 79 sage: TestSuite(J).run(skip =["_test_an_element",\ 80 "_test_elements",\ 81 "_test_elements_eq_reflexive",\ 82 "_test_elements_eq_symmetric",\ 83 "_test_elements_eq_transitive",\ 84 "_test_elements_neq",\ 85 "_test_some_elements"]) 80 86 81 87 :: 82 88 -
sage/structure/element_wrapper.py
diff --git a/sage/structure/element_wrapper.py b/sage/structure/element_wrapper.py
a b class DummyParent(UniqueRepresentation, 335 335 336 336 sage: from sage.structure.element_wrapper import DummyParent 337 337 sage: parent = DummyParent("A Parent") 338 sage: TestSuite(parent).run(skip = ["_test_an_element", "_test_category", "_test_elements", "_test_elements_eq", "_test_some_elements"]) 338 sage: TestSuite(parent).run(skip = ["_test_an_element",\ 339 "_test_category",\ 340 "_test_elements",\ 341 "_test_elements_eq_reflexive",\ 342 "_test_elements_eq_symmetric",\ 343 "_test_elements_eq_transitive",\ 344 "_test_elements_neq",\ 345 "_test_some_elements"]) 339 346 """ 340 347 self.name = name 341 348 -
sage/structure/parent.pyx
diff --git a/sage/structure/parent.pyx b/sage/structure/parent.pyx
a b cdef class Parent(category_object.Catego 642 642 running ._test_not_implemented_methods() . . . pass 643 643 running ._test_pickling() . . . pass 644 644 pass 645 running ._test_elements_eq() . . . pass 645 running ._test_elements_eq_reflexive() . . . pass 646 running ._test_elements_eq_symmetric() . . . pass 647 running ._test_elements_eq_transitive() . . . pass 648 running ._test_elements_neq() . . . pass 646 649 running ._test_eq() . . . pass 647 650 running ._test_not_implemented_methods() . . . pass 648 651 running ._test_one() . . . pass … … cdef class Parent(category_object.Catego 701 704 _test_characteristic 702 705 _test_distributivity 703 706 _test_elements 704 _test_elements_eq 707 _test_elements_eq_reflexive 708 _test_elements_eq_symmetric 709 _test_elements_eq_transitive 710 _test_elements_neq 705 711 _test_eq 706 712 _test_not_implemented_methods 707 713 _test_one