Add ABC for data formats and refactor XSY module to match.
This commit is contained in:
@@ -8,9 +8,10 @@ def test_init():
|
||||
assert isinstance(XSY("tests/data/hsps.xsy"), XSY)
|
||||
|
||||
def test_export():
|
||||
xsy = XSY("tests/data/hsps.xsy")
|
||||
xsy = XSY()
|
||||
datablock = xsy.read("tests/data/hsps.xsy", expand=False)
|
||||
out_path = "tests/output"
|
||||
xsy.datablock.to_csv(
|
||||
datablock.to_csv(
|
||||
os.path.join(out_path, 'datablock.csv'),
|
||||
index=False
|
||||
)
|
||||
@@ -18,7 +19,7 @@ def test_export():
|
||||
os.path.join(out_path, 'defs.csv'),
|
||||
index=False
|
||||
)
|
||||
xsy.datablock_expanded.to_csv(
|
||||
xsy.expand_datablock(datablock).to_csv(
|
||||
os.path.join(out_path, 'expanded.csv'),
|
||||
index=False
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user