#29003: Contributing > Writing Code > Unit tests > Quick start
---------------------------------------------+------------------------
Reporter: Дилян Палаузов | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
---------------------------------------------+------------------------
https://docs.djangoproject.com/en/dev/internals/contributing/writing-code
/unit-tests/ says
Quickstart
{{{
$ git clone [email protected]:YourGitHubName/django.git django-repo
$ cd django-repo/tests
$ pip install -e ..
$ pip install -r requirements/py3.txt
$ ./runtests.py
}}}
which does not work, when Django is not installed (in the virtual
environment). Once we are in the tests directory (or call
`tests/runtests.py`) `os.sys.path` does not contain the parent directory,
so this happens:
{{{
Traceback (most recent call last):
File "./runtests.py", line 14, in <module>
import django
ImportError: No module named 'django'
}}}
Setting `$PYTHONPATH` explicitly to the parent directory helps.
--
Ticket URL: <https://code.djangoproject.com/ticket/29003>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/057.5aca59ee1cc2075b18af6b0688b774bf%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.