def test_filename_with_arbitrary_ext(): db = DB() db._set_path_components(FILE_NAME) assert db._pth == r'f:\projects\examples' assert db._base == r'example-a2l-file.foobar' assert db._dbfn == r'example-a2l-file.a2ldb' assert db._a2lfn == r'example-a2l-file.foobar'
def test_filename_with_a2ldb_ext(): db = DB() db._set_path_components(FILE_NAME) assert db._pth == r"f:\projects\examples" assert db._base == r"example-a2l-file.a2ldb" assert db._dbfn == r"example-a2l-file.a2ldb" assert db._a2lfn == r"example-a2l-file.a2l"
def test_filename_with_a2l_ext(): db = DB() db._set_path_components(r"f:\projects\examples\example-a2l-file.a2l") assert db._pth == r'f:\projects\examples' assert db._base == r'example-a2l-file.a2l' assert db._dbfn == r'example-a2l-file.a2ldb' assert db._a2lfn == r'example-a2l-file.a2l'
from pya2l import DB db = DB() session = db.open_existing("ASAP2_Demo_V161")
import sys from pya2l import DB import pya2l.model as model db = DB() session = db.open_create("ASAP2_Demo_V161") db.export_a2l(sys.stdout)
# # Just import an .a2l file, nothing more. # from pya2l import DB db = DB() session = db.import_a2l("ASAP2_Demo_V161.a2l")