mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Fixed #23289 -- Added mock as a test dependency.
This commit is contained in:
parent
43fcf3505e
commit
82e4f956e3
6 changed files with 34 additions and 8 deletions
|
@ -374,6 +374,16 @@ if __name__ == "__main__":
|
|||
help='Run the Selenium tests as well (if Selenium is installed)')
|
||||
options = parser.parse_args()
|
||||
|
||||
# mock is a required dependency
|
||||
try:
|
||||
from django.test import mock # NOQA
|
||||
except ImportError:
|
||||
print(
|
||||
"Please install test dependencies first: \n"
|
||||
"$ pip install -r requirements/py%s.txt" % sys.version_info.major
|
||||
)
|
||||
sys.exit(1)
|
||||
|
||||
# Allow including a trailing slash on app_labels for tab completion convenience
|
||||
options.modules = [os.path.normpath(labels) for labels in options.modules]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue