Skip to content

Commit 8504c2c

Browse files
committed
fix(test): definitive test_proptest.py - no unused imports, sorted imports, no RESOURCE_TYPES
1 parent f410200 commit 8504c2c

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

tests/test_proptest.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,19 @@
99
1010
Run: pytest tests/test_proptest.py
1111
"""
12-
import pytest
13-
from hypothesis import given, assume, settings
12+
from hypothesis import given, settings
1413
from hypothesis import strategies as st
1514

1615
try:
17-
from freedom_kernel import (
16+
from freedom_kernel import ( # noqa: I001
1817
Action, AgentType, Entity, FreedomVerifier,
1918
OwnershipRegistry, Resource, ResourceType, RightsClaim,
2019
)
2120
RUST_KERNEL = True
2221
except ImportError:
23-
from freedom_theory.kernel.verifier import FreedomVerifier, Action # type: ignore[no-reattr]
24-
from freedom_theory.kernel.entities import Entity, AgentType, Resource, ResourceType
22+
from freedom_theory.kernel.entities import AgentType, Entity, Resource, ResourceType # noqa: I001
2523
from freedom_theory.kernel.registry import OwnershipRegistry, RightsClaim
24+
from freedom_theory.kernel.verifier import Action, FreedomVerifier # type: ignore[no-reattr]
2625
RUST_KERNEL = False
2726

2827

@@ -60,8 +59,7 @@ def test_every_forbidden_flag_blocks(flag):
6059
action = Action(action_id=f"test-{flag}", actor=bot, **{flag: True})
6160
result = v.verify(action)
6261
assert not result.permitted, f"Flag {flag} must always block"
63-
assert any("FORBIDDEN" in viol for viol in result.violations), \
64-
f"Violation list must contain FORBIDDEN for flag {flag}"
62+
assert any("FORBIDDEN" in viol for viol in result.violations), f"Violation list must contain FORBIDDEN for flag {flag}"
6563

6664

6765
@given(

0 commit comments

Comments
 (0)