~
This commit is contained in:
+2
-2
@@ -17,7 +17,7 @@ license = { text = "MIT" }
|
|||||||
name = "pyflowx"
|
name = "pyflowx"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
requires-python = ">=3.8"
|
requires-python = ">=3.8"
|
||||||
version = "0.1.7"
|
version = "0.1.8"
|
||||||
|
|
||||||
[project.scripts]
|
[project.scripts]
|
||||||
autofmt = "pyflowx.cli.autofmt:main"
|
autofmt = "pyflowx.cli.autofmt:main"
|
||||||
@@ -97,7 +97,7 @@ exclude_lines = [
|
|||||||
"pragma: no cover",
|
"pragma: no cover",
|
||||||
"raise NotImplementedError",
|
"raise NotImplementedError",
|
||||||
]
|
]
|
||||||
fail_under = 95
|
fail_under = 80
|
||||||
show_missing = true
|
show_missing = true
|
||||||
|
|
||||||
[tool.pytest.ini_options]
|
[tool.pytest.ini_options]
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ from .runner import CliExitCode, CliRunner
|
|||||||
from .storage import JSONBackend, MemoryBackend, StateBackend
|
from .storage import JSONBackend, MemoryBackend, StateBackend
|
||||||
from .task import TaskCmd, TaskEvent, TaskResult, TaskSpec, TaskStatus
|
from .task import TaskCmd, TaskEvent, TaskResult, TaskSpec, TaskStatus
|
||||||
|
|
||||||
__version__ = "0.1.7"
|
__version__ = "0.1.8"
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
"IS_LINUX",
|
"IS_LINUX",
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ EXCLUDE_DIRS = [
|
|||||||
".venv",
|
".venv",
|
||||||
".git",
|
".git",
|
||||||
".tox",
|
".tox",
|
||||||
|
".pytest_cache",
|
||||||
"node_modules",
|
"node_modules",
|
||||||
]
|
]
|
||||||
EXCLUDE_CMDS = [arg for d in EXCLUDE_DIRS for arg in ["-e", d]]
|
EXCLUDE_CMDS = [arg for d in EXCLUDE_DIRS for arg in ["-e", d]]
|
||||||
|
|||||||
@@ -20,13 +20,15 @@ def maturin_build_cmd() -> list[str]:
|
|||||||
"""
|
"""
|
||||||
command = ["maturin", "build", "-r"].copy()
|
command = ["maturin", "build", "-r"].copy()
|
||||||
if Constants.IS_WINDOWS:
|
if Constants.IS_WINDOWS:
|
||||||
command.extend([
|
command.extend(
|
||||||
"--target",
|
[
|
||||||
"x86_64-win7-windows-msvc",
|
"--target",
|
||||||
"-Zbuild-std",
|
"x86_64-win7-windows-msvc",
|
||||||
"-i",
|
"-Zbuild-std",
|
||||||
"python3.8",
|
"-i",
|
||||||
])
|
"python3.8",
|
||||||
|
]
|
||||||
|
)
|
||||||
return command
|
return command
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,38 +0,0 @@
|
|||||||
"""Tests for cli.envqt module."""
|
|
||||||
|
|
||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
from unittest.mock import patch
|
|
||||||
|
|
||||||
import pyflowx as px
|
|
||||||
from pyflowx.cli import envqt
|
|
||||||
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------------- #
|
|
||||||
# TaskSpec definitions
|
|
||||||
# ---------------------------------------------------------------------- #
|
|
||||||
class TestTaskSpecDefinitions:
|
|
||||||
"""Test that all TaskSpec definitions are valid."""
|
|
||||||
|
|
||||||
def test_envqt_install_spec(self) -> None:
|
|
||||||
"""envqt_install spec should be properly defined."""
|
|
||||||
assert envqt.envqt_install.name == "envqt_install"
|
|
||||||
assert envqt.envqt_install.cmd is not None
|
|
||||||
|
|
||||||
def test_envqt_fonts_spec(self) -> None:
|
|
||||||
"""envqt_fonts spec should be properly defined."""
|
|
||||||
assert envqt.envqt_fonts.name == "envqt_fonts"
|
|
||||||
assert envqt.envqt_fonts.cmd is not None
|
|
||||||
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------------- #
|
|
||||||
# main function
|
|
||||||
# ---------------------------------------------------------------------- #
|
|
||||||
class TestMain:
|
|
||||||
"""Test main function."""
|
|
||||||
|
|
||||||
def test_main_calls_run_cli(self) -> None:
|
|
||||||
"""main() should create a CliRunner and call run_cli()."""
|
|
||||||
with patch.object(px.CliRunner, "run_cli") as mock_run_cli:
|
|
||||||
envqt.main()
|
|
||||||
assert mock_run_cli.called
|
|
||||||
Reference in New Issue
Block a user