Merge pull request 'test: 移除测试里指向仓库外的绝对 sys.path 硬编码(+ 清掉被跟踪的 .pyc)' (#1) from fix/abs-path into main
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,9 +1,11 @@
|
||||
import sys
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
|
||||
import numpy as np
|
||||
|
||||
sys.path.insert(0, "/home/program/NextAgent/src")
|
||||
# 仅依赖本仓库布局:tests/ 的上一级的 src/,不引用仓库外任何绝对路径
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parent.parent / "src"))
|
||||
|
||||
from protocol.registry import PROTOCOL_REGISTRY, FMT_NAMES, PARSER_NAMES
|
||||
from protocol.codec import CodecAdapter, IdentityCodec, EncodingError, DecodingError
|
||||
|
||||
Reference in New Issue
Block a user