[Django] #23666: The command to run the unit tests doesn't work on windows

16 views
Skip to first unread message

Django

unread,
Oct 16, 2014, 9:56:35 AM10/16/14
to django-...@googlegroups.com
#23666: The command to run the unit tests doesn't work on windows
------------------------------------------------+------------------------
Reporter: bmispelon | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: 1.7
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
------------------------------------------------+------------------------
In the contributing guide [1], the command given to run the test suite is
the following:
{{{
$ git clone https://github.com/django/django.git django-repo
$ cd django-repo/tests
$ PYTHONPATH=..:$PYTHONPATH ./runtests.py
}}}

The first two instructions work fine on windows as far as I know but the
first one won't because windows doesn't support setting environment
variables this way.

[1] https://docs.djangoproject.com/en/1.7/internals/contributing/writing-
code/unit-tests/#quickstart

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

Django

unread,
Oct 20, 2014, 6:45:08 PM10/20/14
to django-...@googlegroups.com
#23666: The command to run the unit tests doesn't work on windows
--------------------------------------+------------------------------------

Reporter: bmispelon | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: 1.7
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by timgraham):

* easy: 1 => 0
* stage: Unreviewed => Accepted


Comment:

I use "Git Bash" on Windows instead of tcmd.exe and the command above
works fine. Maybe we should recommend something like that?

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

Django

unread,
Oct 21, 2014, 2:38:52 AM10/21/14
to django-...@googlegroups.com
#23666: The command to run the unit tests doesn't work on windows
--------------------------------------+------------------------------------

Reporter: bmispelon | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: 1.7
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by aaugustin):

Yes, in my experience Git Bash is the least unusable option on Windows.

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

Django

unread,
Mar 8, 2015, 5:42:50 AM3/8/15
to django-...@googlegroups.com
#23666: The command to run the unit tests doesn't work on windows
--------------------------------------+------------------------------------

Reporter: bmispelon | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: 1.7
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by joeri):

The Windows (near) equivalent is to use with cmd.exe:

{{{
$ git clone https://github.com/django/django.git django-repo

$ cd django-repo\tests
$ set PYTHONPATH=..;%PYTHONPATH%
$ python runtests.py
}}}

The third line extends your PYTHONPATH with the parent directory for the
duration of the terminal session.
I added the python command in line 4, to use the one that is set in the
PATH rather than the one registered with Windows.

In my opinion the documentation doesn't need to have a Windows equivalent
of common bash commands.

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

Django

unread,
Mar 22, 2015, 6:57:50 AM3/22/15
to django-...@googlegroups.com
#23666: The command to run the unit tests doesn't work on windows
-------------------------------------+-------------------------------------
Reporter: bmispelon | Owner:
Type: | AnSavvides
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 1.7

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by AnSavvides):

* owner: nobody => AnSavvides
* status: new => assigned


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

Django

unread,
Mar 22, 2015, 7:30:10 AM3/22/15
to django-...@googlegroups.com
#23666: The command to run the unit tests doesn't work on windows
-------------------------------------+-------------------------------------
Reporter: bmispelon | Owner:
Type: | AnSavvides
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 1.7

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by AnSavvides):

* has_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/23666#comment:5>

Django

unread,
Mar 22, 2015, 7:30:54 AM3/22/15
to django-...@googlegroups.com
#23666: The command to run the unit tests doesn't work on windows
-------------------------------------+-------------------------------------
Reporter: bmispelon | Owner:
Type: | AnSavvides
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 1.7

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by AnSavvides):

Here is a link to my patch: [https://github.com/django/django/pull/4371]

--
Ticket URL: <https://code.djangoproject.com/ticket/23666#comment:6>

Django

unread,
Mar 24, 2015, 10:47:06 AM3/24/15
to django-...@googlegroups.com
#23666: The command to run the unit tests doesn't work on windows
-------------------------------------+-------------------------------------
Reporter: bmispelon | Owner:
Type: | AnSavvides
Cleanup/optimization | Status: closed
Component: Documentation | Version: 1.7
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"118cae2df8c89b63a2dcecab0728e6199f101fa1" 118cae2]:
{{{
#!CommitTicketReference repository=""
revision="118cae2df8c89b63a2dcecab0728e6199f101fa1"
Fixed #23666 -- Recommended Git Bash for running unit tests on Windows.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23666#comment:7>

Reply all
Reply to author
Forward
0 new messages