7d4e8a40ce
1. 将原cli根目录下的clearscreen、taskkill、which工具迁移到cli/system子目录 2. 新增cli/dev子目录并添加envdev环境配置工具 3. 更新pyproject.toml中的脚本入口点映射 4. 调整tests/cli下的测试文件导入路径 5. 整理tasks/system.py的__all__导出顺序
22 lines
616 B
Python
22 lines
616 B
Python
"""Tests for cli.clearscreen module."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from unittest.mock import patch
|
|
|
|
import pyflowx as px
|
|
from pyflowx.cli.system import clearscreen
|
|
|
|
|
|
# ---------------------------------------------------------------------- #
|
|
# main function
|
|
# ---------------------------------------------------------------------- #
|
|
class TestMain:
|
|
"""Test main function."""
|
|
|
|
def test_main_creates_graph_and_runs(self) -> None:
|
|
"""main() should create a Graph and run it."""
|
|
with patch.object(px, "run") as mock_run:
|
|
clearscreen.main()
|
|
assert mock_run.called
|