Visual Studio Code: Run Django Tests for the Current File

I’ve been working with Django for a while, and one thing that always slows me down is running tests. By default, you can either run all tests or specify a specific test case. That’s fine, but sometimes I just want to run the tests in the file I’m currently editing - nothing more. So I set up a small workflow in VS Code to do exactly that. Running tests of a single module Normally, you’d run Django tests of a single module like this: ...

September 26, 2025 · 2 min · 356 words · alex