refactor(clan/lib): move tests for persist.util into clan_lib

This commit is contained in:
Johannes Kirschbauer
2025-05-14 12:15:19 +02:00
parent 91034b66bf
commit deb6b57a23
2 changed files with 14 additions and 9 deletions

View File

@@ -3,6 +3,7 @@ from typing import Any
import pytest import pytest
from clan_cli.errors import ClanError from clan_cli.errors import ClanError
from clan_lib.persist.util import ( from clan_lib.persist.util import (
calc_patches, calc_patches,
delete_by_path, delete_by_path,

View File

@@ -7,7 +7,7 @@ name = "clan"
description = "clan cli tool" description = "clan cli tool"
dynamic = ["version"] dynamic = ["version"]
scripts = { clan = "clan_cli:main" } scripts = { clan = "clan_cli:main" }
license = {text = "MIT"} license = { text = "MIT" }
[project.urls] [project.urls]
Homepage = "https://clan.lol/" Homepage = "https://clan.lol/"
@@ -20,12 +20,12 @@ exclude = ["clan_cli.nixpkgs*", "result"]
[tool.setuptools.package-data] [tool.setuptools.package-data]
clan_cli = [ clan_cli = [
"**/allowed-packages.json", "**/allowed-packages.json",
"py.typed", "py.typed",
"templates/**/*", "templates/**/*",
"vms/mimetypes/**/*", "vms/mimetypes/**/*",
"webui/assets/**/*", "webui/assets/**/*",
"flash/*.sh" "flash/*.sh",
] ]
[tool.pytest.ini_options] [tool.pytest.ini_options]
@@ -44,6 +44,12 @@ markers = ["impure", "with_core"]
filterwarnings = "default::ResourceWarning" filterwarnings = "default::ResourceWarning"
python_files = ["test_*.py", "*_test.py"] python_files = ["test_*.py", "*_test.py"]
# TODO: cov seems to conflict with xdist
# [tool.coverage.run]
# branch = true
# source = ["clan_lib"]
# omit = ["*/tests/*", "*/test_*.py", "*/*_test.py", "*/conftest.py", "docs.py"]
[tool.mypy] [tool.mypy]
python_version = "3.12" python_version = "3.12"
warn_redundant_casts = true warn_redundant_casts = true
@@ -51,5 +57,3 @@ disallow_untyped_calls = true
disallow_untyped_defs = true disallow_untyped_defs = true
no_implicit_optional = true no_implicit_optional = true
exclude = "clan_cli.nixpkgs" exclude = "clan_cli.nixpkgs"