Files
AuDaGe/tests/test_xsy.py

26 lines
597 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)
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
)