Phase 1 of package refactor. Moves all source modules into pm3py/core/ with file renames (hf_14a→hf_iso14a, hf_15→hf_iso15, hf_mf→hf_mfc) and client attribute normalization (hf.a14→hf.iso14a, hf.mf→hf.mfc). pm3py/__init__.py re-exports from core for backward compat. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
14 lines
499 B
Python
14 lines
499 B
Python
import asyncio
|
|
from unittest.mock import AsyncMock
|
|
from pm3py.core.protocol import Cmd
|
|
from pm3py.core.transport import PM3Response
|
|
from pm3py.core.hf import HFCommands
|
|
|
|
def test_hf_tune():
|
|
t = AsyncMock()
|
|
hf = HFCommands(t)
|
|
t.send_ng.return_value = PM3Response(cmd=Cmd.MEASURE_ANTENNA_TUNING_HF, status=0,
|
|
reason=0, ng=True, data=b"\x00" * 4)
|
|
result = asyncio.get_event_loop().run_until_complete(hf.tune())
|
|
assert "voltage_mV" in result
|