import sys from pathlib import Path import pytest sys.path.insert(0,str(Path(__file__).resolve().parents[1])) @pytest.fixture def ascii_schematic(): # Purpose-built unit-test records, not an application demo or a real Altium export. return b'''|HEADER=Protel for Windows - Schematic Capture Ascii File Version 5.0|Weight=9 |RECORD=31|FontIdCount=1|Size1=10|FontName1=Arial |RECORD=1|LibReference=R_Symbol|Location.X=100|Location.Y=200|CurrentPartId=1|PartCount=2|Orientation=1|IsMirrored=T |RECORD=13|OwnerIndex=1|OwnerPartId=1|Location.X=100|Location.Y=200|Corner.X=100|Corner.Y=220|Color=128 |RECORD=2|OwnerIndex=1|OwnerPartId=1|Location.X=100|Location.Y=220|PinLength=10|PinConglomerate=25|Name=A|Designator=1|Electrical=4 |RECORD=34|OwnerIndex=1|OwnerPartId=-1|Text=R1|Location.X=105|Location.Y=205 |RECORD=41|OwnerIndex=1|OwnerPartId=-1|Name=Comment|Text=4K7|Location.X=110|Location.Y=205 |RECORD=41|OwnerIndex=1|OwnerPartId=-1|Name=Manufacturer|Text=Test|IsHidden=T |RECORD=27|OwnerPartId=-1|LocationCount=2|X1=100|Y1=230|X2=150|Y2=230 |RECORD=25|Text=VCC|Location.X=150|Location.Y=230 '''