Did I find the right examples for you? yes no

All Samples(12)  |  Call(8)  |  Derive(0)  |  Import(4)

src/c/o/cogent-1.5.3/tests/test_util/test_transform.py   cogent(Download)
from cogent.util.unit_test import TestCase, main
from cogent.util.misc import identity
from cogent.util.transform import apply_each, bools, bool_each, \
    conjoin, all, both,\
    disjoin, any, either, negate, none, neither, compose, compose_many, \
    def test_find_no(self):
        """find_no should be True if none of the words in the string"""
 
        f = find_no('ab')
        self.assertEqual(f(''),1) #empty
 
        # works on any sequence
        f = find_no(['foo','bar'])
        self.assertEqual(f("joe"),1)
        self.assertEqual(f("only foo"),0)

src/p/y/pycogent-HEAD/tests/test_util/test_transform.py   pycogent(Download)
from cogent.util.unit_test import TestCase, main
from cogent.util.misc import identity
from cogent.util.transform import apply_each, bools, bool_each, \
    conjoin, all, both,\
    disjoin, any, either, negate, none, neither, compose, compose_many, \
    def test_find_no(self):
        """find_no should be True if none of the words in the string"""
 
        f = find_no('ab')
        self.assertEqual(f(''),1) #empty
 
        # works on any sequence
        f = find_no(['foo','bar'])
        self.assertEqual(f("joe"),1)
        self.assertEqual(f("only foo"),0)

src/c/o/cogent-1.5.3/tests/test_util/test_organizer.py   cogent(Download)
 
from cogent.util.organizer import Filter, Organizer, GroupList, regroup
from cogent.util.transform import find_any, find_no, find_all,\
    keep_if_more, exclude_if_more, keep_if_more_other, exclude_if_more_other
from cogent.util.unit_test import TestCase,main
        seq6 = Sequence('',{})
 
        f = Filter('valid',{None:[find_all('AGCU'),find_no('N')],\
                            'Gene':[find_any(['LSU'])]})
        self.assertEqual(f(seq1),True)
                self.seq5,self.seq6,self.seq7]
 
        f = Filter('valid',{None:[find_all('AGCU'),find_no('N')],\
                            'Gene':[find_any(['LSU'])]})
        self.Mult_func_org = Organizer([f])

src/p/y/pycogent-HEAD/tests/test_util/test_organizer.py   pycogent(Download)
 
from cogent.util.organizer import Filter, Organizer, GroupList, regroup
from cogent.util.transform import find_any, find_no, find_all,\
    keep_if_more, exclude_if_more, keep_if_more_other, exclude_if_more_other
from cogent.util.unit_test import TestCase,main
        seq6 = Sequence('',{})
 
        f = Filter('valid',{None:[find_all('AGCU'),find_no('N')],\
                            'Gene':[find_any(['LSU'])]})
        self.assertEqual(f(seq1),True)
                self.seq5,self.seq6,self.seq7]
 
        f = Filter('valid',{None:[find_all('AGCU'),find_no('N')],\
                            'Gene':[find_any(['LSU'])]})
        self.Mult_func_org = Organizer([f])