Setting --rootdir=tests in addopts keeps pytest's path resolution inside the tests directory. Combined with --import-mode=importlib (which loads test files via importlib.util without sys.path package walking), this fully avoids the import of the package-level __init__.py during test discovery — that file uses ComfyUI-style relative imports that only resolve under ComfyUI's loader. --confcutdir=tests stops conftest.py search at the tests dir for the same reason. The root conftest.py is left in place but is no longer needed for sys.path setup; importlib mode handles that automatically.
38 lines
992 B
TOML
38 lines
992 B
TOML
[project]
|
|
name = "comfyui-moss-tts"
|
|
version = "0.1.0"
|
|
description = "ComfyUI custom nodes for MOSS-TTS 1.7B zero-shot voice cloning"
|
|
readme = "README.md"
|
|
license = { text = "MIT" }
|
|
requires-python = ">=3.10"
|
|
dependencies = [
|
|
"transformers>=4.40",
|
|
"accelerate",
|
|
"torchaudio",
|
|
"librosa",
|
|
"soundfile",
|
|
"einops",
|
|
"omegaconf",
|
|
"sentencepiece",
|
|
"protobuf",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
dev = ["pytest>=7", "pytest-mock"]
|
|
|
|
[project.urls]
|
|
Homepage = "https://github.com/Eutectico/ComfyUI-MOSS-TTS"
|
|
|
|
[tool.comfy]
|
|
PublisherId = ""
|
|
DisplayName = "MOSS-TTS"
|
|
Icon = ""
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
addopts = "--import-mode=importlib --rootdir=tests --confcutdir=tests"
|
|
# --rootdir=tests prevents pytest's discovery from walking up into the package
|
|
# root and trying to import its __init__.py (which uses ComfyUI-style relative
|
|
# imports that only resolve when ComfyUI's loader runs the package).
|
|
# sys.path setup happens in tests/conftest.py.
|