File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -894,15 +894,15 @@ def mock_open(*args, **kwargs):
894
894
@pytest .mark .asyncio
895
895
async def test_initialization_with_environment_error (monkeypatch ):
896
896
"""Test TextEditor initialization when environment validation fails."""
897
-
897
+
898
898
def mock_validate_environment (self ):
899
899
raise EnvironmentError ("Failed to validate environment" )
900
-
900
+
901
901
# Patch the _validate_environment method
902
902
monkeypatch .setattr (TextEditor , "_validate_environment" , mock_validate_environment )
903
-
903
+
904
904
# Verify that initialization fails with the expected error
905
905
with pytest .raises (EnvironmentError ) as excinfo :
906
906
TextEditor ()
907
-
907
+
908
908
assert "Failed to validate environment" in str (excinfo .value )
You can’t perform that action at this time.
0 commit comments