1 hour ago · Tech · hide · 0 comments

When contributing to Django, you’ll want to run its test suite to check your changes. The official contributing docs cover setup in Running the unit tests, using a virtual environment and pip. Here’s an alternative guide using uv. Setup First, clone Django and change into the repository: $ git clone https://github.com/django/django $ cd django (You can fork it later if you want to make a pull request.) Then, create a virtual environment: $ uv venv Using CPython 3.14.6 Creating virtual environment at: .venv Activate with: source .venv/bin/activate uv automatically picks a compatible Python version for you, downloading one if needed. Next, install Django in editable mode, plus the test requirements, in one command: $ uv pip install -e . -r tests/requirements/py3.txt uv pip automatically targets the .venv directory, so there’s no need to activate it first. Run the tests Activate the virtual environment, change into the tests directory, and run runtests.py: $ source .venv/bin/activate $…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.