Did I find the right examples for you? yes no

All Samples(3)  |  Call(2)  |  Derive(0)  |  Import(1)

src/s/t/streaming_lsh-HEAD/streaming_lsh/tests/classes_tests.py   streaming_lsh(Download)
from Bio import trie
from library.classes import TwoWayMap
from classes import Signature, SignaturePermutationWithTrie, SignatureTrie, Document,\
    RandomGaussianUnitVector, Permutation, VectorPermutation, Cluster,\
    UtilityMethods
    def setUp(self): self.pm = Permutation(maximumValue=13)
    def test_exceptionForMaxValueNotPrime(self): self.assertRaises(Exception, Permutation, 10)
    def test_initialization(self):
        self.assertTrue(self.pm.a<self.pm.p and self.pm.b<self.pm.p)
        self.assertTrue(self.pm.a%2!=0)
    def test_applyFunction(self):
        l = [self.pm.applyFunction(i) for i in range(self.pm.p)]
        self.assertEqual(sorted(l), range(self.pm.p))
    def test_equality(self):
        pm1 = Permutation(maximumValue=13)