Example #1
0
    def testAllIBEnc(self):
        ibe_names = all_unittests.find_modules()
        ibe_classes = all_unittests.collectSubClasses(IBEnc, ibe_names)

        group = PairingGroup('../param/d224.param', 1024)
        for c in ibe_classes:
            print("Testing ", c)
            M = "test message"
            Test.myCorrectnessTest(c, group, M)
Example #2
0
 def testAllIBEnc(self):
     ibe_names = all_unittests.find_modules()
     ibe_classes = all_unittests.collectSubClasses(IBEnc, ibe_names)
     
     group = PairingGroup('MNT224', 1024)
     for c in ibe_classes:
         print("Testing ", c)
         M = "test message"
         Test.myCorrectnessTest(c, group, M)
Example #3
0
def autoDiscoverSchemes():
    '''Dynamically add a test method for each class'''
    ibe_names = all_unittests.find_modules()
    ibe_classes = all_unittests.collectSubClasses(IBEnc, ibe_names)

    for c in ibe_classes:
        name = "test" + c.__name__
        M = "test message"
        group = PairingGroup('../param/d224.param', 1024)
        func = lambda *args, **kwargs: Test.myCorrectnessTest(c, group, M)
        setattr(Test, name, func)
Example #4
0
def autoDiscoverSchemes():
    '''Dynamically add a test method for each class'''
    ibe_names   = all_unittests.find_modules()
    ibe_classes = all_unittests.collectSubClasses(IBEnc, ibe_names)
    
    for c in ibe_classes:
        name = "test" + c.__name__
        M = "test message"
        group = PairingGroup('../param/d224.param', 1024)
        func = lambda *args, **kwargs : Test.myCorrectnessTest(c, group, M)
        setattr(Test, name, func)