https://github.com/Dans-labs/text-fabric
Revision 164c75a33b2970c7ea4a4f8d0c8cc3111ca5b820 authored by Dirk Roorda on 07 December 2016, 13:18:51 UTC, committed by Dirk Roorda on 07 December 2016, 13:18:51 UTC
1 parent 83f093d
Tip revision: 164c75a33b2970c7ea4a4f8d0c8cc3111ca5b820 authored by Dirk Roorda on 07 December 2016, 13:18:51 UTC
docs
docs
Tip revision: 164c75a
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()
Computing file changes ...