[Answered ]-Django testing views – getting error – DiscoverRunner.run_tests() takes 2 positional arguments but 3 were given

1👍

Django removed the parameter extra_tests in Django 5.0 and PyCharm‘s test runner is still providing it.

See django’s release notes:

The extra_tests argument for DiscoverRunner.build_suite() and DiscoverRunner.run_tests() is removed.

You could downgrade to django 4.2 until this is fixed by Jetbrains.

A Pycharm issue regarding this deprecation exists, see PY-53355.

Leave a comment