Commit 08618329 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

TEST: Test default aux file names

parent 0a8cee2b
......@@ -9,6 +9,7 @@ import textwrap as tw
import itertools as it
import os.path as op
import os
import random
from unittest import mock
......@@ -17,6 +18,7 @@ import numpy as np
import pandas as pd
import funpack.main as main
import funpack.icd10 as icd10
import funpack.custom as custom
import funpack.expression as expression
import funpack.processing as processing
......@@ -70,7 +72,7 @@ def test_main_icd10():
got =
assert exp == got = []
......@@ -321,3 +323,38 @@ def test_main_summary_file():
assert[3, 'ChildValues'] == str([3, 'ChildValues'])
assert[4, 'Clean'] == '[{}]'.format(
str([4, 'Clean']['flattenHierarchical']))
def test_main_default_auxfile_names():
with tempdir():
gen_test_data(20, 20, 'data.tsv')
main.main('-wl -wu -wim -wde -ws -ia '
'my_output.tsv data.tsv'.split())
assert op.exists('my_output.tsv')
assert op.exists('my_output_log.txt')
assert op.exists('my_output_unknown_vars.txt')
assert op.exists('my_output_icd10_map.txt')
assert op.exists('my_output_description.txt')
assert op.exists('my_output_summary.txt')
with tempdir():
gen_test_data(20, 20, 'data.tsv')
main.main('-wl -wu -wim -wde -ws -ia '
'-lf mylog.txt '
'-uf myunknowns.txt '
'-imf myicd10s.txt '
'-def mydesc.txt '
'-sf mysum.txt '
'my_output.tsv data.tsv'.split())
assert op.exists('my_output.tsv')
assert op.exists('mylog.txt')
assert op.exists('myunknowns.txt')
assert op.exists('myicd10s.txt')
assert op.exists('mydesc.txt')
assert op.exists('mysum.txt')
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment