agreed about this is a unittest/pytest specific focus, not django.
This is pretty straightforward to do with pytest, can have a custom flag
and then randomize the test collection. With unittest, not sure.
On Monday, February 12, 2024 at 11:36:57 AM UTC-5 Jörg Breitbart wrote:
> I also think th
I also think that your requirements are too specific to be added to
django. You are prolly better suited by creating your own test picking
abstraction for this, e.g. by writing custom test suite aggregates or
using unittest.TestLoader.discover and going into tests of interest by
your own logic
I’d be against this. I think this approach would be counterproductive in most
cases due to the high probability of a false positive. Including it as a core
feature is not necessary when it can be added through a third party package.
On Mon, Feb 12, 2024, at 2:22 PM, אורי wrote:
> Hi,
>
> Also,
Hi,
Also, sometimes I just want to see how many tests are in a specific module,
without running them. So I can just run
`./tests_manage_all_sites_with_all_warnings.sh test speedy.net --test-only
0 --test-all-languages` which gives me the number of tests in speedy.net,
or any module I need. There i
Hi Jörg,
All our tests are tested anyway with GitHub Actions. The idea is to run a
subset of tests locally to catch 90% of the problems before I commit and
wait 40 minutes for all the tests to run. It works most of the time. Of
course the whole tests should be run before deploying to production, b
Adding to my last comment:
If you are looking for a more tailored unit testing with low test
pressure and still high reliability - maybe coverage.py can give you
enough code insights to build a tailored test index db to only run
affected tests from current code changes. I am not aware of test
@Uri
May I ask, whats the idea behind running a random subset of tests only?
Wouldn't a Monte Carlo approach be highly unreliable, e.g. lure ppl into
thinking everything is ok, but in reality the random test selection did
not catch affected code paths? I mean for tests - its all about
reliabi
Django developers,
I created https://code.djangoproject.com/ticket/35183 and was asked
to start a discussion on the DevelopersMailingList. I'm requesting a
new feature request - Run only a random subset of tests.
tests - add a new argument "--test-only" (int, >=0) and If run