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

Commit

Permalink
src/sage/misc/lazy_import.pyx: Warnings suppress duplicates, so use a…
Browse files Browse the repository at this point in the history
… different import for the repeated test
  • Loading branch information
Matthias Koeppe committed Oct 10, 2021
1 parent 98d2e9b commit 4a8f409
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/sage/misc/lazy_import.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,11 @@ cdef class LazyImport(object):
Integer Ring
sage: my_integer_ring._object is None
False
sage: my_integer_ring = LazyImport('sage.rings.all', 'ZZ', at_startup=True)
sage: my_integer_ring
sage: my_rats = LazyImport('sage.rings.rational_field', 'QQ', at_startup=True)
sage: my_rats
doctest:warning...
UserWarning: Option ``at_startup=True`` for lazy import ZZ not needed anymore
Integer Ring
UserWarning: Option ``at_startup=True`` for lazy import QQ not needed anymore
Rational Field
"""
if self._object is not None:
return self._object
Expand Down

0 comments on commit 4a8f409

Please sign in to comment.