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

Mark some slow tests as slow #37363

Merged
merged 14 commits into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/sage/rings/number_field/number_field_rel.py
Original file line number Diff line number Diff line change
Expand Up @@ -2467,7 +2467,7 @@
EXAMPLES::

sage: P.<a,b,c> = QQ[2^(1/2), 2^(1/3), 3^(1/2)] # needs sage.symbolic
sage: R = P.order([a,b,c]); R # needs sage.symbolic
sage: R = P.order([a,b,c]); R # long time (83s), needs sage.symbolic
grhkm21 marked this conversation as resolved.
Show resolved Hide resolved
Relative Order generated by
grhkm21 marked this conversation as resolved.
Show resolved Hide resolved
[((-36372*sqrt3 + 371270)*a^2 + (-89082*sqrt3 + 384161)*a - 422504*sqrt3 - 46595)*sqrt2 + (303148*sqrt3 - 89080)*a^2 + (313664*sqrt3 - 218211)*a - 38053*sqrt3 - 1034933,
((-65954*sqrt3 + 323491)*a^2 + (-110591*sqrt3 + 350011)*a - 351557*sqrt3 + 77507)*sqrt2 + (264138*sqrt3 - 161552)*a^2 + (285784*sqrt3 - 270906)*a + 63287*sqrt3 - 861151,
Expand All @@ -2478,7 +2478,7 @@

The base ring of an order in a relative extension is still `\ZZ`.::

sage: R.base_ring() # needs sage.symbolic

Check warning on line 2481 in src/sage/rings/number_field/number_field_rel.py

View workflow job for this annotation

GitHub Actions / build

Warning: Variable 'R' referenced here was set only in doctest marked '# long time

Variable 'R' referenced here was set only in doctest marked '# long time, needs sage.symbolic'
Integer Ring

One must give enough generators to generate a ring of finite index
Expand Down
6 changes: 3 additions & 3 deletions src/sage/rings/polynomial/polynomial_element.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -5211,13 +5211,13 @@ cdef class Polynomial(CommutativePolynomial):
sage: # needs sage.rings.finite_rings
sage: P.<x> = PolynomialRing(GF(401^13, 'a'))
sage: t = 2*x^14 - 5 + 6*x
sage: t.splitting_field('b')
sage: t.splitting_field('b') # long time -- 16s
grhkm21 marked this conversation as resolved.
Show resolved Hide resolved
Finite Field in b of size 401^104
sage: t = 24*x^13 + 2*x^12 + 14
sage: t.splitting_field('b')
sage: t.splitting_field('b') # long time -- 39s
Finite Field in b of size 401^156
sage: t = x^56 - 14*x^3
sage: t.splitting_field('b')
sage: t.splitting_field('b') # long time -- 2s
Finite Field in b of size 401^52

sage: R.<x> = QQ[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,7 @@ def minpoly(self):

We make sure that the previous example works on random examples::

sage: # long time
sage: # needs sage.rings.finite_rings
grhkm21 marked this conversation as resolved.
Show resolved Hide resolved
sage: p = random_prime(50)
sage: K.<u> = GF((p, randrange(1,20)))
Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/tate_algebra_ideal.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@

TESTS::

sage: cython( # needs sage.misc.cython
sage: cython( # long time 6.5s, needs sage.misc.cython
grhkm21 marked this conversation as resolved.
Show resolved Hide resolved
....: '''
....: from sage.rings.tate_algebra_ideal cimport regular_reduce
....: def python_regular_reduce(gb, s, v, stopval):
Expand All @@ -638,10 +638,10 @@
sage: p1 = (tx, x^3 + 9*x*y)
sage: p2 = (ty, x*y + 3*x^2*y)

sage: python_regular_reduce([p1,p2], tx*ty, v, 8) # indirect doctest # needs sage.misc.cython

Check warning on line 641 in src/sage/rings/tate_algebra_ideal.pyx

View workflow job for this annotation

GitHub Actions / build

Warning: Variable 'python_regular_reduce' referenced here was set only in doctest marked '# long time

Variable 'python_regular_reduce' referenced here was set only in doctest marked '# long time, needs sage.misc.cython'
(2 + O(3^8))*x^2*y + (1 + O(3^8))*x + (1 + O(3^8))*y + O(3^8 * <x, y>)

sage: python_regular_reduce([p1,p2], tx, v, 8) # indirect doctest # needs sage.misc.cython

Check warning on line 644 in src/sage/rings/tate_algebra_ideal.pyx

View workflow job for this annotation

GitHub Actions / build

Warning: Variable 'python_regular_reduce' referenced here was set only in doctest marked '# long time

Variable 'python_regular_reduce' referenced here was set only in doctest marked '# long time, needs sage.misc.cython'
(2 + 2*3 + 2*3^2 + 2*3^3 + 2*3^4 + 2*3^5 + 2*3^6 + 2*3^7 + O(3^8))*x^3
+ (2 + O(3^8))*x^2*y + (1 + O(3^8))*x + (1 + O(3^8))*y + O(3^8 * <x, y>)
"""
Expand Down
6 changes: 3 additions & 3 deletions src/sage/schemes/elliptic_curves/ell_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -1419,10 +1419,10 @@ def kernel_polynomial_from_point(self, P, *, algorithm=None):
sage: from sage.schemes.elliptic_curves.ell_field import EllipticCurve_field, point_of_order
sage: p = 2^127 - 1
sage: E = EllipticCurve(GF(p), [1,0])
sage: P = point_of_order(E, 31)
sage: %timeit E.kernel_polynomial_from_point(P, algorithm='basic') # not tested
sage: P = point_of_order(E, 31) # long time -- 8.5s
sage: %timeit E.kernel_polynomial_from_point(P, algorithm='basic') # not tested
4.38 ms ± 13.7 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)
sage: %timeit E.kernel_polynomial_from_point(P, algorithm='minpoly') # not tested
sage: %timeit E.kernel_polynomial_from_point(P, algorithm='minpoly') # not tested
854 µs ± 1.56 µs per loop (mean ± std. dev. of 7 runs, 1,000 loops each)

Example of finding all the rational isogenies using this method::
Expand Down
2 changes: 1 addition & 1 deletion src/sage/schemes/elliptic_curves/ell_number_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ def _scale_by_units(self):
sage: K.<a> = QuadraticField(4569)
sage: j = 46969655/32768
sage: E = EllipticCurve(j=K(j))
sage: C = E.isogeny_class()
sage: C = E.isogeny_class() # long time -- 9.5s
"""
K = self.base_field()
r1, r2 = K.signature()
Expand Down
6 changes: 3 additions & 3 deletions src/sage/schemes/elliptic_curves/isogeny_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -1399,7 +1399,7 @@ def possible_isogeny_degrees(E, algorithm='Billerey', max_l=None,
Over an extension field::

sage: E3 = E.change_ring(CyclotomicField(3))
sage: possible_isogeny_degrees(E3)
sage: possible_isogeny_degrees(E3) # long time -- 5s
[5]
sage: [phi.degree() for phi in E3.isogenies_prime_degree()]
[5, 5]
Expand All @@ -1421,7 +1421,7 @@ def possible_isogeny_degrees(E, algorithm='Billerey', max_l=None,

sage: K.<a> = NumberField(x^4 - 5*x^2 + 3)
sage: E = EllipticCurve(K, [a^2 - 2, -a^2 + 3, a^2 - 2, -50*a^2 + 35, 95*a^2 - 67])
sage: possible_isogeny_degrees(E, exact=False, algorithm='Billerey')
sage: possible_isogeny_degrees(E, exact=False, algorithm='Billerey') # long time -- 6.5s
[2, 5]
sage: possible_isogeny_degrees(E, exact=False, algorithm='Larson')
[2, 5]
Expand All @@ -1432,7 +1432,7 @@ def possible_isogeny_degrees(E, algorithm='Billerey', max_l=None,

This function only returns the primes which are isogeny degrees::

sage: Set(E.isogeny_class().matrix().list())
sage: Set(E.isogeny_class().matrix().list()) # long time -- 7s
{1, 2, 4, 5, 20, 10}

For curves with CM by a quadratic order of class number greater
Expand Down
Loading