diff --git a/ml-agents/mlagents/trainers/tests/test_learn.py b/ml-agents/mlagents/trainers/tests/test_learn.py
index <HASH>..<HASH> 100644
--- a/ml-agents/mlagents/trainers/tests/test_learn.py
+++ b/ml-agents/mlagents/trainers/tests/test_learn.py
@@ -3,6 +3,7 @@ from unittest.mock import MagicMock, patch, mock_open
 from mlagents.trainers import learn
 from mlagents.trainers.trainer_controller import TrainerController
 from mlagents.trainers.learn import parse_command_line
+from mlagents_envs.exception import UnityEnvironmentException
 
 
 def basic_options(extra_args=None):
@@ -75,6 +76,16 @@ def test_docker_target_path(
             assert mock_init.call_args[0][2] == "/dockertarget/summaries"
 
 
+def test_bad_env_path():
+    with pytest.raises(UnityEnvironmentException):
+        learn.create_environment_factory(env_path="/foo/bar",
+                                         docker_target_name=None,
+                                         no_graphics=True,
+                                         seed=None,
+                                         start_port=8000,
+                                         env_args=None)
+
+
 @patch("builtins.open", new_callable=mock_open, read_data="{}")
 def test_commandline_args(mock_file):
Adding test for bad env_path on create_environment_factory