Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ ignore = [
"PTH109", # `os.getcwd()` should be replaced by `Path.cwd()`
"RUF005", # Consider `[*path, str(key)]` instead of concatenation
"RUF029", # Function is declared `async`, but doesn't `await` or use `async` features.
"S108", # Probable insecure usage of temporary file or directory
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
"S701", # By default, jinja2 sets `autoescape` to `False`. Consider using `autoescape=True`
"SIM102", # Use a single `if` statement instead of nested `if` statements
Expand Down
8 changes: 5 additions & 3 deletions tests/unit/sdk/checks/test_checks.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from pathlib import Path

import pytest

from infrahub_sdk import InfrahubClient
Expand All @@ -6,7 +8,7 @@
pytestmark = pytest.mark.httpx_mock(can_send_already_matched_responses=True)


async def test_class_init() -> None:
async def test_class_init(tmp_path: Path) -> None:
class IFCheckNoQuery(InfrahubCheck):
pass

Expand All @@ -29,9 +31,9 @@ class IFCheckNoName(InfrahubCheck):
check = IFCheckNoName()
assert check.name == "IFCheckNoName"

check = IFCheckWithName(root_directory="/tmp")
check = IFCheckWithName(root_directory=str(tmp_path))
assert check.name == "my_check"
assert check.root_directory == "/tmp"
assert check.root_directory == str(tmp_path)


async def test_async_init(client) -> None:
Expand Down