| Age | Commit message (Collapse) | Author |
|
When "FORCE_COLOR" was set in the environment (such as in django-docker-box)
several test cases that rely on string comparisons against exception
messages or command line results would fail due to ANSI escape sequences
being present in the output. This change resolved the issue by setting
the "PYTHON_COLORS" environment variable to "0" for those specific tests,
which takes precendence over the presence of "FORCE_COLOR".
|
|
https://github.com/psf/black/releases/tag/26.1.0
|
|
|
|
Thanks Natalia Bidart for the review.
|
|
tblib 3.2+.
tblib 3.2+ makes exception subclasses with __init__() and the default
__reduce__() picklable. This broke the test for
RemoteTestResult._confirm_picklable(), which expects a specific
exception to fail unpickling.
https://github.com/ionelmc/python-tblib/blob/master/CHANGELOG.rst#320-2025-10-21
This fix defines ExceptionThatFailsUnpickling.__reduce__() in a way
that pickle.dumps(obj) succeeds, but pickle.loads(pickle.dumps(obj))
raises TypeError.
Refs #27301. This preserves the intent of the regression test from
52188a5ca6bafea0a66f17baacb315d61c7b99cd without skipping it.
|
|
ParallelTestSuiteTest.test_buffer_mode_reports_setupclass_failure() without tblib.
|
|
Thanks Javier Buzzi and Adam Johnson for reviews.
Co-authored-by: Simon Charette <charette.s@gmail.com>
|
|
Workers created by ParallelTestSuite were not running system
checks in the spawn multiprocessing mode. In general this is
fine, but system checks can have side effects expected by tests.
This patch runs system checks inside of _init_worker, which is
only called by ParallelTestSuite.
|
|
|
|
Rewrapped long docstrings and block comments to 79 characters + newline
using script from https://github.com/medmunds/autofix-w505.
|
|
Thanks to Jacob Walls for the report and previous iterations of this
fix, to Simon Charette for the logging formatter idea, and to Tim Graham
for testing and ensuring that 3rd party backends remain compatible.
This partially reverts d8f093908c504ae0dbc39d3f5231f7d7920dde37.
Refs #36112, #35448.
Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
|
|
Given there are no longer any internal usages of serialize=True and it
poses a risk to non-test databases integrity it seems appropriate to
deprecate it.
|
|
While the top-level objects fed to serialization are bound to the test
database being created nothing prevents code invoked during
serialization from performing queries against other connections entries
that haven't been swapped yet.
The reported example of that is a database router directing all reads to
a test mirror for a set of models involving auto-created many-to-many
fields. It might be tempting to address the many-to-many field case but
this a symptom of a larger problem where the test framework yields the
flow execution to user code that could interact with non-test databases
in unexpected ways.
Deferring test database fixture serialization until the point where all
connections entries have been swapped for their test equivalent ensures
that no code triggered during serialization can interact with non-test
databases.
Thanks Jake Howard for the report and Jacob Walls for the initial
investigation.
|
|
|
|
Also adds DatabaseOperations.format_debug_sql() hook for backends
(e.g. NoSQL) to customize formatting.
|
|
|
|
ParallelTestSuiteTest.test_handle_add_error_before_first_test() without tblib.
Follow up to 661dfdd59809f4abd5077f7a2529735d07b98ba4.
|
|
|
|
"forkserver" is the new default on POSIX systems, and Django doesn't
support parallel tests with "forkserver":
https://github.com/python/cpython/commit/b65f2cdfa77d8d12c213aec663ddaaa30d75a4b2
|
|
without tblib.
Follow up to c09e8f5fd8f977bf16e9ec5d11b370151fc81ea8.
|
|
|
|
https://github.com/psf/black/releases/tag/24.1.0
|
|
parallel workers.
|
|
|
|
- backends.sqlite.tests.ThreadSharing.test_database_sharing_in_threads
- backends.tests.ThreadTests.test_default_connection_thread_local:
on SQLite, close() doesn't explicitly close in-memory connections.
- servers.tests.LiveServerInMemoryDatabaseLockTest
- test_runner.tests.SQLiteInMemoryTestDbs.test_transaction_support
Check out https://github.com/python/cpython/pull/108015.
|
|
|
|
Black 23.1.0 is released which, as the first release of the year,
introduces the 2023 stable style. This incorporates most of last year's
preview style.
https://github.com/psf/black/releases/tag/23.1.0
|
|
DiscoverRunner.build_suite()/run_tests().
Per deprecation timeline.
|
|
|
|
Identified using the following command:
$ pcre2grep --line-number --multiline --recursive \
"(?s)(\n +)(\w+) = [^\n]+\1return \2;?$" \
django docs extras js_tests scripts tests
|
|
|
|
Bug in 3b3f38b3b09b0f2373e51406ecb8c9c45d36aebc.
Thanks Kevin Renskers for the report.
|
|
Thanks Pēteris Caune for the report.
Regression in 3b3f38b3b09b0f2373e51406ecb8c9c45d36aebc.
|
|
Python 3.11 uses fully qualified test name in unittest output. See
https://github.com/python/cpython/commit/755be9b1505af591b9f2ee424a6525b6c2b65ce9
|
|
runner when using spawn.
Regression in 3b3f38b3b09b0f2373e51406ecb8c9c45d36aebc.
Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
|
|
Co-authored-by: Valz <ahmadahussein0@gmail.com>
Co-authored-by: Nick Pope <nick@nickpope.me.uk>
|
|
|
|
|
|
In these cases Black produces unexpected results, e.g.
def make_random_password(
self,
length=10,
allowed_chars='abcdefghjkmnpqrstuvwxyz' 'ABCDEFGHJKLMNPQRSTUVWXYZ' '23456789',
):
or
cursor.execute("""
SELECT ...
""",
[table name],
)
|
|
successes.
|
|
|
|
and runtests.py.
Regression in ae89daf46f83a7b39d599d289624c3377bfa4ab1.
Thanks Tim Graham for the report.
|
|
|
|
DiscoverRunner.parallel is used in setup_databases() and
teardown_databases() to control the number of test databases.
Regression in cb6c19749d342c3dc0f97d89ff6887b220cf45b8.
|
|
|
|
|
|
DiscoverRunner.build_suite()/run_tests().
|
|
"test --shuffle" skipped test methods when test classes were mixed.
This changes runner.py's reorder_tests() to group by TestCase class.
Regression in 90ba716bf060ee7fef79dc230b0b20644839069f.
|
|
|
|
|