mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2026-10-29 09:11:57 +00:00
17 lines
560 B
Python
17 lines
560 B
Python
"""Dependency imports used by the API must not rely on deprecated aliases."""
|
|||
|
|
|
||
|
|
import subprocess
|
||
|
|
import sys
|
||
|
|
|
||
|
|
|
||
|
|
def test_starlette_testclient_import_without_deprecated_anyio_alias():
|
||
|
|
# A fresh interpreter exercises the import even if test collection imported it already.
|
||
|
|
result = subprocess.run(
|
||
|
|
[sys.executable, "-W", "error::DeprecationWarning", "-c", "import starlette.testclient"],
|
||
|
|
capture_output=True,
|
||
|
|
text=True,
|
||
|
|
check=False,
|
||
|
|
timeout=30,
|
||
|
|
)
|
||
|
|
assert result.returncode == 0, result.stdout + result.stderr
|