diff --git a/pythonFiles/unittestadapter/django_test_init.py b/pythonFiles/unittestadapter/django_test_init.py index d1477cec1b7d9..a634758712591 100644 --- a/pythonFiles/unittestadapter/django_test_init.py +++ b/pythonFiles/unittestadapter/django_test_init.py @@ -11,16 +11,16 @@ def setup_django_test_env(workspace_directory=None): """Configures the Django environment for running Django tests. If Django is not installed, workspace_directory is not in sys.path or - manage.py can not be found inside workspace_directory, the function fails quietly. + manage.py can not be found inside the given workspace_directory, the function fails quietly. Args: - workspace_directory (str): The current workspace directory that is expected to contain manage.py + workspace_directory (str): The current workspace directory that is expected to contain manage.py module Returns: None """ - # It's possible that workspace_directory is not in sys.path and then django.setup() will raise ModuleNotFoundError exception + # To avoid false positive ModuleNotFoundError from django.setup() due to missing current workspace in sys.path sys.path.insert(0, os.getcwd()) try: