Revision 15670974638a48d26c5aca0c90aad53b2c5ac301 authored by Dirk Roorda on 01 March 2017, 19:02:16 UTC, committed by Dirk Roorda on 01 March 2017, 19:02:16 UTC
1 parent 3aa892c
Raw File
tf-test.py
from tf.read import readFeature

testDir = 'tests'

def test_monads():
    result = readFeature('{}/{}.tf'.format('tests', 'monads'))

    if result == None:
        print('There were errors')
    else:
        (isEdge, metaData, data) = result
        label = 'edge' if isEdge else 'node'
        print('{} feature\n{}\nData: {} {}s'.format(
            label,
            '\n'.join('{:<20}: {}'.format(*x) for x in sorted(metaData.items())),
            len(data),
            label,
        ))

test_monads()
back to top