mirror of
https://github.com/django/daphne.git
synced 2025-07-26 15:09:46 +03:00
* Added test for twisted plugin installation. Refs #557. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fixed setuptools configuration Port correct configuration from old setup.cfg file. Regression in #542. Fixes #557. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
16 lines
474 B
Python
16 lines
474 B
Python
import sys
|
|
from pathlib import Path
|
|
|
|
|
|
def test_fd_endpoint_plugin_installed():
|
|
# Find the site-packages directory
|
|
for path in sys.path:
|
|
if "site-packages" in path:
|
|
site_packages = Path(path)
|
|
break
|
|
else:
|
|
raise AssertionError("Could not find site-packages in sys.path")
|
|
|
|
plugin_path = site_packages / "twisted" / "plugins" / "fd_endpoint.py"
|
|
assert plugin_path.exists(), f"fd_endpoint.py not found at {plugin_path}"
|