24 lines
695 B
Python
24 lines
695 B
Python
"""Раскладка пакетов: чистый импорт и пути, зависящие от места файла."""
|
|
import subprocess
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
import jira_hub
|
|
|
|
|
|
def test_fresh_imports():
|
|
r = subprocess.run(
|
|
[sys.executable, "-c", "import jira_hub.core.api, jira_hub.core.mcp, jira_hub.modules.jira.mcp, jira_hub.cli"],
|
|
capture_output=True, text=True)
|
|
assert r.returncode == 0, r.stderr
|
|
|
|
|
|
def test_web_app_path():
|
|
from jira_hub.core import api
|
|
assert api.WEB_APP == Path(jira_hub.__file__).parent / "web" / "app"
|
|
|
|
|
|
def test_hub_root():
|
|
from jira_hub.core import mcp
|
|
assert (mcp.HUB_ROOT / "pyproject.toml").is_file()
|