1
0
mirror of https://github.com/django/django.git synced 2024-12-23 01:25:58 +00:00
django/tests
Carlton Gibson 236e6cb588 Refs #31407 -- Handled potential exception in test cleanup.
The test view may not be called when running the tests with
--parallel=2 or greater. Catch the AttributeError for this case.
2022-02-15 14:38:19 +01:00
..
absolute_url_overrides Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
admin_autodiscover Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
admin_changelist Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
admin_checks Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
admin_custom_urls Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
admin_default_site Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
admin_docs Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
admin_filters Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
admin_inlines Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
admin_ordering Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
admin_registration Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
admin_scripts Refs #33476 -- Made management commands use black. 2022-02-11 12:23:26 +01:00
admin_utils Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
admin_views Simplified SimpleTestCase.assertFormError()/assertFormsetErrors() calls in admin_views tests. 2022-02-14 11:34:58 +01:00
admin_widgets Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
aggregation Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
aggregation_regress Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
annotations Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
app_loading Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
apps Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
asgi Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
async Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
auth_tests Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
backends Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
base
bash_completion Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
basic Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
builtin_server Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
bulk_create Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
cache Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
check_framework Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
conditional_processing Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
constraints Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
contenttypes_tests Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
context_processors Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
csrf_tests Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
custom_columns Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
custom_lookups Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
custom_managers Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
custom_methods Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
custom_migration_operations Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
custom_pk Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
datatypes Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
dates Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
datetimes Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
db_functions Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
db_typecasts Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
db_utils Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
dbshell Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
decorators Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
defer Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
defer_regress Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
delete Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
delete_regress Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
deprecation Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
dispatch Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
distinct_on_fields Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
empty
empty_models Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
expressions Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
expressions_case Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
expressions_window Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
extra_regress Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
field_deconstruction Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
field_defaults Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
field_subclassing Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
file_storage Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
file_uploads Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
files Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
filtered_relation Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
fixtures Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
fixtures_model_package Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
fixtures_regress Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
flatpages_tests Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
force_insert_update Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
foreign_object Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
forms_tests Fixed #29490 -- Added support for object-based Media CSS and JS paths. 2022-02-10 08:48:27 +01:00
from_db_value Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
generic_inline_admin Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
generic_relations Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
generic_relations_regress Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
generic_views Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
get_earliest_or_latest Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
get_object_or_404 Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
get_or_create Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
gis_tests Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
handlers Refs #31407 -- Handled potential exception in test cleanup. 2022-02-15 14:38:19 +01:00
httpwrappers Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
humanize_tests Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
i18n Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
import_error_package
indexes Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
inline_formsets Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
inspectdb Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
introspection Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
invalid_models_tests Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
known_related_objects Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
logging_tests Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
lookup Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
m2m_and_m2o Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
m2m_intermediary Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
m2m_multiple Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
m2m_recursive Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
m2m_regress Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
m2m_signals Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
m2m_through Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
m2m_through_regress Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
m2o_recursive Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
mail Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
managers_regress Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
many_to_many Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
many_to_one Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
many_to_one_null Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
max_lengths Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
messages_tests Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
middleware Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
middleware_exceptions Fixed #33495 -- Improved debug logging message about adapting handlers for middlewares. 2022-02-09 12:10:26 +01:00
migrate_signals Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
migration_test_data_persistence Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
migrations Refs #33476 -- Made management commands use black. 2022-02-11 12:23:26 +01:00
migrations2 Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
model_enums Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
model_fields Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
model_forms Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
model_formsets Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
model_formsets_regress Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
model_indexes Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
model_inheritance Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
model_inheritance_regress Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
model_meta Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
model_options Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
model_package Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
model_regress Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
model_utils Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
modeladmin Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
multiple_database Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
mutually_referential Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
nested_foreign_keys Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
no_models Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
null_fk Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
null_fk_ordering Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
null_queries Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
one_to_one Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
or_lookups Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
order_with_respect_to Fixed #33501 -- Made order_with_respect_to respect database routers. 2022-02-09 13:31:49 +01:00
ordering Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
pagination Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
postgres_tests Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
prefetch_related Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
project_template Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
properties Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
proxy_model_inheritance Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
proxy_models Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
queries Fixed #33506 -- Made QuerySet.bulk_update() perform atomic writes against write database. 2022-02-09 11:14:50 +01:00
queryset_pickle Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
raw_query Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
redirects_tests Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
requests Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
requirements Refs #33476 -- Made management commands use black. 2022-02-11 12:23:26 +01:00
reserved_names Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
resolve_url Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
responses Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
reverse_lookup Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
save_delete_hooks Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
schema Refs #32502 -- Avoided table rebuild when removing fields on SQLite 3.35.5+. 2022-02-11 22:21:58 +01:00
select_for_update Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
select_related Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
select_related_onetoone Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
select_related_regress Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
serializers Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
servers Refs #25684 -- Removed double newline from request/response output of runserver. 2022-02-14 06:55:34 +01:00
sessions_tests Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
settings_tests Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
shell Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
shortcuts Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
signals Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
signed_cookies_tests Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
signing Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
sitemaps_tests Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
sites_framework Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
sites_tests Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
staticfiles_tests Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
str Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
string_lookup Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
swappable_models Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
syndication_tests Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
template_backends Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
template_loader Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
template_tests Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
templates
test_client Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
test_client_regress Refs #33348 -- Improved messages raised by SimpleTestCase.assertFormError()/assertFormsetErrors(). 2022-02-15 07:15:44 +01:00
test_exceptions Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
test_runner Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
test_runner_apps Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
test_utils Refs #33348 -- Made SimpleTestCase.assertFormError() raise ValueError when "field" is passed without "form_index". 2022-02-15 10:30:20 +01:00
timezones Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
transaction_hooks Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
transactions Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
unmanaged_models Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
update Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
update_only_fields Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
urlpatterns Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
urlpatterns_reverse Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
user_commands Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
utils_tests Fixed #26287 -- Added support for addition operations to SimpleLazyObject. 2022-02-10 11:24:51 +01:00
validation Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
validators Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
version Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
view_tests Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
wsgi Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
.coveragerc
README.rst
runtests.py Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
test_sqlite.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
urls.py

To run the test suite, first, create and activate a virtual environment. Then
install some requirements and run the tests::

    $ cd tests
    $ python -m pip install -e ..
    $ python -m pip install -r requirements/py3.txt
    $ ./runtests.py

For more information about the test suite, see
https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/unit-tests/.