mirror of
https://github.com/RustyRaptor/doge_cogs.git
synced 2026-12-03 15:55:21 -07:00
- tests/test_watch_cog.py + watch_helpers.py: the watch cog against a fake media-preload on a real socket (spec-shaped JSON, bearer token), so the generated client, httpx, httpcore and anyio all run. 21 tests; checked against six mutations of watch.py, each caught. - scripts/test-container.sh installs cog requirements the way Red's Downloader does (pip -t lib, image's PIP_CONSTRAINT, lib appended after the venv via DOGE_COGS_LIB). On the pre-constraint image 20 watch tests fail with the 2026-11-09 production error; on the current image all pass. - test_alignment_isolation: discover every core module instead of a hand list that had missed guess, render, baseline, sampling and others. - TESTING.md (the loop, good tests, layers) and CLAUDE.md for agents. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
17 lines
547 B
Python
17 lines
547 B
Python
"""Import the cogs' modules the way Red does.
|
|
|
|
Red appends Downloader's lib folder (where it pip-installs cog requirements)
|
|
to sys.path, *after* its own venv. scripts/test-container.sh installs the
|
|
requirements the same way and passes the folder in ``DOGE_COGS_LIB``, so a
|
|
requirement that only works with lib's copy of a package Red already has
|
|
fails here too.
|
|
"""
|
|
|
|
import os
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
|
|
if lib := os.environ.get("DOGE_COGS_LIB"):
|
|
sys.path.append(lib)
|