| Age | Commit message (Collapse) | Author |
|
dbs setup.
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.
Backport of dc69a63f844b2ef3bc3371edde91644cf0bef0ee from main
|
|
|
|
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.
|
|
|
|
|
|
|
|
For example, with this change, the following now works from the tests
directory:
$ ./runtests.py view_tests/tests/
|
|
|
|
The parallel test runner uses multiple workers to distribute the
workload. These workers are assigned a worker ID using a globally
incremented variable, which determines what test database to connect
to. When the worker ID surpasses the test database IDs Django will
crash.
This reduce likelihood of crashing parallel tests because
ParallelTestSuite will no longer create more workers than TestCases.
It won't eliminate the problem completely though because there are
other circumstances in which new workers can be created which can then
be assigned an "illegal" worker ID.
|
|
loader patterns.
Thanks Chris Jerdonek for the report and reviews.
|
|
finding one test.
This also removes passing level to log() as logging.INFO is the default.
|
|
Thanks Carlton Gibson, Chris Jerdonek, and David Smith for reviews.
|
|
Thanks Chris Jerdonek for reviews.
|
|
a file path.
|
|
errors.
This mades _FailedTest objects always match tags in DiscoverRunner.
|
|
Failures detected when loading tests are ordered before all of the
above for quicker feedback. This includes things like test modules that
couldn't be found or that couldn't be loaded due to syntax errors.
|
|
Follow up to e3bca22e7e572b0274a0814c7869c899d7b544e0.
|
|
|
|
|