Example #1
0
def test_dataset_summary():
    for ds in datasets.itervalues():
        s = ds.summary()
        ok_(s.startswith(str(ds)[1:-1])) # we strip surrounding '<...>'
        # TODO: actual test of what was returned; to do that properly
        #       RF the summary() so it is a dictionary

        summaries = ['Sequence statistics']
        if 'targets' in ds.sa and 'chunks' in ds.sa:
            summaries += ['Summary for targets', 'Summary for chunks']

        # By default we should get all kinds of summaries
        if not 'Number of unique targets >' in s:
            for summary in summaries:
                ok_(summary in s)

        # If we give "wrong" targets_attr we should see none of summaries
        s2 = ds.summary(targets_attr='bogus')
        for summary in summaries:
            ok_(not summary in s2)
Example #2
0
def test_dataset_summary():
    for ds in datasets.itervalues():
        s = ds.summary()
        ok_(s.startswith(str(ds)[1:-1])) # we strip surrounding '<...>'