mirror of
https://github.com/nesquena/hermes-webui.git
synced 2026-05-23 10:50:14 +00:00
5192ca5de5
* feat: attention state for broken cron jobs + Korean i18n (#1133, @franksong2702) * fix: pytest state isolation for direct session saves (#1136, @franksong2702) * fix(#1095): image thumbnails in composer + lightbox in chat (#1135) * fix(css): restore cron attention + detail-alert rules overwritten by style.css merge (absorb) * docs: v0.50.225 release notes and version bump --------- Co-authored-by: nesquena-hermes <nesquena-hermes@users.noreply.github.com>
23 lines
784 B
Python
23 lines
784 B
Python
"""
|
|
Regression tests for pytest-process state isolation.
|
|
|
|
Some tests import api.config/api.models during collection and directly write
|
|
sessions from the pytest process. conftest must publish the test state env vars
|
|
before those imports, not only for the server subprocess.
|
|
"""
|
|
|
|
from pathlib import Path
|
|
|
|
|
|
def test_api_config_uses_pytest_state_dir():
|
|
import api.config as config
|
|
from tests.conftest import TEST_STATE_DIR
|
|
|
|
test_state_dir = TEST_STATE_DIR.resolve()
|
|
production_state_dir = (Path.home() / ".hermes" / "webui").resolve()
|
|
|
|
assert config.STATE_DIR == test_state_dir
|
|
assert config.SESSION_DIR == test_state_dir / "sessions"
|
|
assert config.STATE_DIR != production_state_dir
|
|
assert production_state_dir not in config.SESSION_DIR.resolve().parents
|