How to see which tests were run during Django’s manage.py test command

You can pass -v 2 to the test command:

python manage.py test -v 2

After running this command you’ll get something like this (I’m using django 2, feel free to ignore migrations/database stuff):

Creating test database for alias 'default' ('file:memorydb_default?mode=memory&cache=shared')...
Operations to perform:
  Synchronize unmigrated apps: messages, staticfiles
  Apply all migrations: admin, auth, contenttypes, sessions
Synchronizing apps without migrations:
  Creating tables...
   Running deferred SQL...
Running migrations:
  Applying contenttypes.0001_initial... OK
  ...
  Applying sessions.0001_initial... OK
System check identified no issues (0 silenced).
test_equal_hard (polls.tests.TestHard) ... ok      <--------+
test_equal_simple (polls.tests.TestSimple) ... ok  <--------+
                                                            |
                                                            |
           That's your tests!  >----------------------------+

By the way, v stands for verbosity (You can also use --verbosity=2):

python manage.py test --verbosity=2

Here’s the excerpt from the python manage.py test --help:

-v {0,1,2,3}, –verbosity {0,1,2,3}

Verbosity level; 0=minimal output, 1=normal output,
2=verbose output, 3=very verbose output

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)