|
9 | 9 |
|
10 | 10 | Run: pytest tests/test_proptest.py |
11 | 11 | """ |
12 | | -import pytest |
13 | | -from hypothesis import given, assume, settings |
| 12 | +from hypothesis import given, settings |
14 | 13 | from hypothesis import strategies as st |
15 | 14 |
|
16 | 15 | try: |
17 | | - from freedom_kernel import ( |
| 16 | + from freedom_kernel import ( # noqa: I001 |
18 | 17 | Action, AgentType, Entity, FreedomVerifier, |
19 | 18 | OwnershipRegistry, Resource, ResourceType, RightsClaim, |
20 | 19 | ) |
21 | 20 | RUST_KERNEL = True |
22 | 21 | 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 |
25 | 23 | from freedom_theory.kernel.registry import OwnershipRegistry, RightsClaim |
| 24 | + from freedom_theory.kernel.verifier import Action, FreedomVerifier # type: ignore[no-reattr] |
26 | 25 | RUST_KERNEL = False |
27 | 26 |
|
28 | 27 |
|
@@ -60,8 +59,7 @@ def test_every_forbidden_flag_blocks(flag): |
60 | 59 | action = Action(action_id=f"test-{flag}", actor=bot, **{flag: True}) |
61 | 60 | result = v.verify(action) |
62 | 61 | 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}" |
65 | 63 |
|
66 | 64 |
|
67 | 65 | @given( |
|
0 commit comments