Browse Source

🐛 Fix Windows UnicodeEncodeError in CLI test (#14295)

Co-authored-by: Sofie Van Landeghem <[email protected]>
Co-authored-by: Sebastián Ramírez <[email protected]>
pull/14432/head
Hemanth U 6 months ago
committed by GitHub
parent
commit
bf322d0e94
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      tests/test_fastapi_cli.py

2
tests/test_fastapi_cli.py

@ -1,3 +1,4 @@
import os
import subprocess
import sys
from unittest.mock import patch
@ -20,6 +21,7 @@ def test_fastapi_cli():
],
capture_output=True,
encoding="utf-8",
env={**os.environ, "PYTHONIOENCODING": "utf-8"},
)
assert result.returncode == 1, result.stdout
assert "Path does not exist non_existent_file.py" in result.stdout

Loading…
Cancel
Save