django/tests/utils_tests
Ran Benita ae94077e7d Made proxy class in lazy() prepare eagerly.
Previously, the proxy class was prepared lazily:

  lazy_identity = lazy(identity, int)
  lazy_identity(10)  # prepared here
  lazy_identity(10)

This has a slight advantage that if the lazy doesn't end up getting
used, the preparation work is skipped, however that's not very likely.

Besides this laziness, it is also inconsistent in that the methods which
are wrapped directly (__str__ etc.) are prepared already when __proxy__
is defined, and there is a weird half-initialized state.

This change it so that everything is prepared already on the first line
of the example above.
2023-06-12 05:45:44 +02:00
..
archives Fixed #30160 -- Added support for LZMA and XZ templates to startapp/startproject management commands. 2019-07-31 10:02:13 +02:00
eggs
files Rewrote strip_tags test file to lorem ipsum. 2022-03-08 14:50:06 +01:00
test_module Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
traversal_archives Fixed CVE-2021-3281 -- Fixed potential directory-traversal via archive.extract(). 2021-02-01 09:07:36 +01:00
__init__.py
deconstructible_classes.py Refs #21275 -- Added more tests for @deconstructible decorator. 2022-01-04 13:08:36 +01:00
models.py
test_archive.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
test_autoreload.py Fixed #34233 -- Dropped support for Python 3.8 and 3.9. 2023-01-18 09:46:01 +01:00
test_connection.py Prevented initialization of unused database connections. 2022-03-17 07:40:57 +01:00
test_crypto.py Refs #33476 -- Applied Black's 2023 stable style. 2023-02-01 11:04:38 +01:00
test_datastructures.py Completed test coverage for django.utils.datastructures. 2023-02-15 07:45:00 +01:00
test_dateformat.py Refs #32365 -- Removed support for pytz timezones per deprecation timeline. 2023-01-17 11:49:15 +01:00
test_dateparse.py Refs #33173 -- Fixed test_dateparse tests on Python 3.11+. 2022-05-09 10:38:11 +02:00
test_deconstruct.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
test_decorators.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
test_duration.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
test_encoding.py Refs #33173 -- Used locale.getlocale() instead of getdefaultlocale(). 2022-03-08 13:17:05 +01:00
test_feedgenerator.py Refs #32365 -- Removed internal uses of utils.timezone.utc alias. 2022-03-24 06:29:50 +01:00
test_functional.py Made proxy class in lazy() prepare eagerly. 2023-06-12 05:45:44 +02:00
test_hashable.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
test_html.py Fixed #34609 -- Deprecated calling format_html() without arguments. 2023-06-06 14:14:57 +02:00
test_http.py Fixed #34194 -- Added django.utils.http.content_disposition_header(). 2022-12-05 13:08:00 +01:00
test_inspect.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
test_ipv6.py Updated documentation and comments for RFC updates. 2022-11-10 13:52:17 +01:00
test_jslex.py Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
test_lazyobject.py Refs #28358 -- Fixed infinite recursion in LazyObject.__getattribute__(). 2022-02-17 14:52:17 +01:00
test_lorem_ipsum.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
test_module_loading.py Fixed #34233 -- Dropped support for Python 3.8 and 3.9. 2023-01-18 09:46:01 +01:00
test_no_submodule.py
test_numberformat.py Refs #34000 -- Optimized handling None values in numberformat.format(). 2022-09-12 13:02:50 +02:00
test_os_utils.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
test_regex_helper.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
test_safestring.py Fixed #20296 -- Prevented mark_safe() from evaluating lazy objects. 2022-02-21 10:11:26 +01:00
test_simplelazyobject.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
test_termcolors.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
test_text.py Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
test_timesince.py Refs #34483 -- Fixed timesince()/timeuntil() with timezone-aware dates on different days and interval less than 1 day. 2023-04-14 17:41:03 +02:00
test_timezone.py Fixed #34233 -- Dropped support for Python 3.8 and 3.9. 2023-01-18 09:46:01 +01:00
test_tree.py Refs #32948 -- Renamed Node._new_instance() to Node.create(). 2022-07-27 10:06:24 +02:00
utils.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00