refactor: remove all backward-compat shims from sim/

Deletes 24 shim files from sim/. All test imports now point directly
to canonical transponders/ and trace/ paths. sim/ contains only
infrastructure (15 files): frame, memory, transponder ABC, reader ABC,
medium, sim_session, table_compiler, replay, relay, fuzzer, pm3medium,
mcu_bridge, mcu_protocol, dual_session, __init__.

751 tests passing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
michael
2026-03-18 20:56:40 -07:00
parent 8e8b945246
commit c1ab980036
48 changed files with 256 additions and 304 deletions

View File

@@ -3,12 +3,12 @@ import asyncio
import pytest
from pm3py.sim.medium import SoftwareMedium
from pm3py.sim.implants import (
from pm3py.transponders.implants import (
xEM, xNT, xM1, FlexDF, NExT,
MagicMifareClassicTag,
)
from pm3py.sim.em4100 import EM4100Reader
from pm3py.sim.iso14443a import Reader14443A, _compute_bcc
from pm3py.transponders.lf.em.em4100 import EM4100Reader
from pm3py.transponders.hf.iso14443a.base import Reader14443A, _compute_bcc
def run(coro):
@@ -36,7 +36,7 @@ class TestXNT:
assert tag._total_pages >= 45 # NTAG213+ size
def test_is_type2_tag(self):
from pm3py.sim.ndef import NfcType2Tag
from pm3py.transponders.hf.iso14443a.ndef import NfcType2Tag
tag = xNT()
assert isinstance(tag, NfcType2Tag)
@@ -77,7 +77,7 @@ class TestMagicMifareClassic:
class TestFlexDF:
def test_creates_desfire(self):
from pm3py.sim.desfire import DesfireTag
from pm3py.transponders.hf.iso14443a.nxp.desfire import DesfireTag
tag = FlexDF()
assert isinstance(tag, DesfireTag)
@@ -92,7 +92,7 @@ class TestNExT:
# LF side is T5577 configured as EM4100
assert lf.blocks[0] != 0
# HF side is NfcType2Tag (xNT)
from pm3py.sim.ndef import NfcType2Tag
from pm3py.transponders.hf.iso14443a.ndef import NfcType2Tag
assert isinstance(hf, NfcType2Tag)
def test_both_sides_work(self):