[Django] #32270: Changing Django’s default test runner to be more robust

28 views
Skip to first unread message

Django

unread,
Dec 15, 2020, 7:10:51 AM12/15/20
to django-...@googlegroups.com
#32270: Changing Django’s default test runner to be more robust
---------------------------------------------+-------------------------
Reporter: Diptesh Choudhuri | Owner: nobody
Type: New feature | Status: new
Component: Testing framework | Version: 3.1
Severity: Normal | Keywords: testing
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
---------------------------------------------+-------------------------
The default django test runner gets the job done, but it (and the entire
django codebase) can benefit from a more robust runner, like **pytest** or
**nose**. I will take the example of **pytest** because I am familiar with
it and it is more widely used.

Anyone who has used **pytest** with django will immediately agree that it
is much more pleasurable to work with, albeit a bit more intimidating. I
intend work on the intimidating part and make it easier by adding a lot
of documentation.

Please let me know your opinions on this topic. If it gets traction, I
will work on compiling a list of what **pytest** has over the default
runner, and what I intend to do to solve all of this.

**NOTE**: If accepted, this will be my proposal for GSoC 2021.

Best,
Diptesh

--
Ticket URL: <https://code.djangoproject.com/ticket/32270>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Dec 15, 2020, 7:14:40 AM12/15/20
to django-...@googlegroups.com
#32270: Changing Django’s default test runner to be more robust
-----------------------------------+--------------------------------------

Reporter: Diptesh Choudhuri | Owner: nobody
Type: New feature | Status: new
Component: Testing framework | Version: master
Severity: Normal | Resolution:

Keywords: testing | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------
Changes (by Diptesh Choudhuri):

* version: 3.1 => master


Old description:

> The default django test runner gets the job done, but it (and the entire
> django codebase) can benefit from a more robust runner, like **pytest**
> or **nose**. I will take the example of **pytest** because I am familiar
> with it and it is more widely used.
>
> Anyone who has used **pytest** with django will immediately agree that it
> is much more pleasurable to work with, albeit a bit more intimidating. I
> intend work on the intimidating part and make it easier by adding a lot
> of documentation.
>
> Please let me know your opinions on this topic. If it gets traction, I
> will work on compiling a list of what **pytest** has over the default
> runner, and what I intend to do to solve all of this.
>
> **NOTE**: If accepted, this will be my proposal for GSoC 2021.
>
> Best,
> Diptesh

New description:

The default django test runner gets the job done, but it (and the entire
django codebase) can benefit from a more robust runner, like **pytest** or
**nose**. I will take the example of **pytest** because I am familiar with
it and it is more widely used.

Anyone who has used **pytest** with django will immediately agree that it
is much more pleasurable to work with, albeit a bit more intimidating. I
intend work on the intimidating part and make it easier by adding a lot
of documentation.

Please let me know your opinions on this topic. If it gets traction, I
will work on compiling a list of what **pytest** has over the default
runner, and what I intend to do to solve all of this.

**NOTE**: If accepted, this will be my proposal for GSoC 2021 to the
Django Organization.

Best,
Diptesh

--

--
Ticket URL: <https://code.djangoproject.com/ticket/32270#comment:1>

Django

unread,
Dec 15, 2020, 7:31:57 AM12/15/20
to django-...@googlegroups.com
#32270: Changing Django’s default test runner to be more robust
-----------------------------------+--------------------------------------

Reporter: Diptesh Choudhuri | Owner: nobody
Type: New feature | Status: new
Component: Testing framework | Version: master
Severity: Normal | Resolution:

Keywords: testing | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------
Description changed by Diptesh Choudhuri:

Old description:

> The default django test runner gets the job done, but it (and the entire
> django codebase) can benefit from a more robust runner, like **pytest**
> or **nose**. I will take the example of **pytest** because I am familiar
> with it and it is more widely used.
>
> Anyone who has used **pytest** with django will immediately agree that it
> is much more pleasurable to work with, albeit a bit more intimidating. I
> intend work on the intimidating part and make it easier by adding a lot
> of documentation.
>
> Please let me know your opinions on this topic. If it gets traction, I
> will work on compiling a list of what **pytest** has over the default
> runner, and what I intend to do to solve all of this.
>

> **NOTE**: If accepted, this will be my proposal for GSoC 2021 to the
> Django Organization.
>
> Best,
> Diptesh

New description:

The default django test runner gets the job done, but it (and the entire
django codebase) can benefit from a more robust runner, like **pytest** or
**nose**. I will take the example of **pytest** because I am familiar with
it and it is more widely used.

Anyone who has used **pytest** with django will immediately agree that it
is much more pleasurable to work with, albeit a bit more intimidating. I
intend work on the intimidating part and make it easier by adding a lot
of documentation.

Please let me know your opinions on this topic. If it gets traction, I
will work on compiling a list of what **pytest** has over the default
runner, and what I intend to do to solve all of this.

**NOTE**: If accepted, this will be my proposal for GSoC 2021 to the
Django Organization.

EDIT: I also made a post about this in the django developers google group
(https://groups.google.com/g/django-developers) but for some reason, it
said that it needs to be approved before being moade available to the
public. If someone could look into that, it'd be great.

Best,
Diptesh

--

--
Ticket URL: <https://code.djangoproject.com/ticket/32270#comment:2>

Django

unread,
Dec 15, 2020, 8:49:51 AM12/15/20
to django-...@googlegroups.com
#32270: Changing Django’s default test runner to be more robust
-----------------------------------+--------------------------------------

Reporter: Diptesh Choudhuri | Owner: nobody
Type: New feature | Status: new
Component: Testing framework | Version: master
Severity: Normal | Resolution:

Keywords: testing | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------

Comment (by ADI33352):

yes you can there are many good advantages that I see by viewing through
There are a lot more features overall, but I think one major reason people
use nose/djano_nose is that it allows you to very easily do code coverage.
nose comes with a number of builtin plugins to help you with output
capture, error introspection etc . So sure you can do it I Don't know
pytest much

--
Ticket URL: <https://code.djangoproject.com/ticket/32270#comment:3>

Django

unread,
Dec 15, 2020, 11:56:52 AM12/15/20
to django-...@googlegroups.com
#32270: Changing Django’s default test runner to be more robust
-----------------------------------+--------------------------------------

Reporter: Diptesh Choudhuri | Owner: nobody
Type: New feature | Status: closed

Component: Testing framework | Version: master
Severity: Normal | Resolution: duplicate

Keywords: testing | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------
Changes (by Mariusz Felisiak):

* status: new => closed
* resolution: => duplicate


Comment:

> Anyone who has used pytest with django will immediately agree that it is
much more pleasurable to work with, ...

We shouldn't generalize, I've used `pytest` but I don't agree that it's
much better then Django's test runner.

I think it's basically a duplicate of #25707.

--
Ticket URL: <https://code.djangoproject.com/ticket/32270#comment:4>

Reply all
Reply to author
Forward
0 new messages