Did I find the right examples for you? yes no

All Samples(6)  |  Call(4)  |  Derive(0)  |  Import(2)

src/c/o/cogent-1.5.3/tests/test_util/test_misc.py   cogent(Download)
from cogent.app.util import get_tmp_filename
from cogent.util.unit_test import TestCase, main
from cogent.util.misc import (iterable, max_index, min_index,
    flatten, is_iterable, is_char, is_char_or_noniterable,
    is_str_or_noniterable, not_list_tuple, list_flatten,
        data = [1, 2, 3, 3, 3, 4, 4, 5]
        expect = [[0, 1], [1, 2], [2, 3], [5, 4], [7, 5]]
        got = get_run_start_indices(data)
        self.assertEqual(list(got), expect)
 
        # raise an exception if try and provide a converter and num digits
        def wrap_gen(): # need to wrap generator so we can actually test this
            gen = get_run_start_indices(data, digits=1,

src/p/y/pycogent-HEAD/tests/test_util/test_misc.py   pycogent(Download)
from cogent.app.util import get_tmp_filename
from cogent.util.unit_test import TestCase, main
from cogent.util.misc import (iterable, max_index, min_index,
    flatten, is_iterable, is_char, is_char_or_noniterable,
    is_str_or_noniterable, not_list_tuple, list_flatten,
        data = [1, 2, 3, 3, 3, 4, 4, 5]
        expect = [[0, 1], [1, 2], [2, 3], [5, 4], [7, 5]]
        got = get_run_start_indices(data)
        self.assertEqual(list(got), expect)
 
        # raise an exception if try and provide a converter and num digits
        def wrap_gen(): # need to wrap generator so we can actually test this
            gen = get_run_start_indices(data, digits=1,