Opened 10 years ago
Closed 10 years ago
#23666 closed Cleanup/optimization (fixed)
The command to run the unit tests doesn't work on windows
Reported by: | Baptiste Mispelon | Owned by: | Andreas Savvides |
---|---|---|---|
Component: | Documentation | Version: | 1.7 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
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
Change History (7)
comment:1 by , 10 years ago
Easy pickings: | unset |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:3 by , 10 years ago
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.
comment:4 by , 10 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:5 by , 10 years ago
Has patch: | set |
---|
I use "Git Bash" on Windows instead of tcmd.exe and the command above works fine. Maybe we should recommend something like that?