Files
AuDaGe/tests/test_xsy.py
2026-06-26 09:47:58 -05:00

27 lines
622 B
Python

import os
from pandas import DataFrame
from AuDaGe.formats.controlexpert.xsy import XSY
def test_init():
assert isinstance(XSY("tests/data/hsps.xsy"), XSY)
def test_export():
xsy = XSY()
datablock = xsy.read("tests/data/hsps.xsy", expand=False)
print(xsy.def_paths)
out_path = "tests/output"
datablock.to_csv(
os.path.join(out_path, "datablock.csv"),
index=False
)
xsy.defs.to_csv(
os.path.join(out_path, "defs.csv"),
index=False
)
xsy.expand_datablock(datablock).to_csv(
os.path.join(out_path, "expanded.csv"),
index=False
)