Example #1
0
 def testValidateBadValues(self):
     for cls in protocol.getProtocolClasses():
         instance = self.getTypicalInstance(cls)
         jsonDict = instance.toJsonDict()
         self.assertFalse(cls.validate(None))
         self.assertFalse(cls.validate([]))
         self.assertFalse(cls.validate(1))
         # setting values to bad values should be invalid
         for key in jsonDict.keys():
             dct = dict(jsonDict)
             dct[key] = self.getInvalidValue(cls, key)
             self.assertFalse(cls.validate(dct))
         for c in utils.powerset(jsonDict.keys(), 10):
             if len(c) > 0:
                 dct = dict(jsonDict)
                 for f in c:
                     dct[f] = self.getInvalidValue(cls, f)
                 self.assertFalse(cls.validate(dct))
Example #2
0
 def testValidateBadValues(self):
     for cls in protocol.getProtocolClasses():
         instance = self.getTypicalInstance(cls)
         jsonDict = instance.toJsonDict()
         self.assertFalse(cls.validate(None))
         self.assertFalse(cls.validate([]))
         self.assertFalse(cls.validate(1))
         # setting values to bad values should be invalid
         for key in jsonDict.keys():
             dct = dict(jsonDict)
             dct[key] = self.getInvalidValue(cls, key)
             self.assertFalse(cls.validate(dct))
         for c in utils.powerset(jsonDict.keys(), 10):
             if len(c) > 0:
                 dct = dict(jsonDict)
                 for f in c:
                     dct[f] = self.getInvalidValue(cls, f)
                 self.assertFalse(cls.validate(dct))
Example #3
0
 def testSearchCallSetIdsSystematic(self):
     for sampleIds in utils.powerset(self.vcfSamples, maxSets=10):
         self._verifyVariantsCallSetIds(list(sampleIds))
Example #4
0
 def testSearchCallSetIdsSystematic(self):
     for sampleIds in utils.powerset(self.vcfSamples, maxSets=10):
         # TODO remove this for protocol 0.6
         if len(sampleIds) == 0:
             sampleIds = self.vcfSamples
         self._verifyVariantsCallSetIds(None, list(sampleIds))
Example #5
0
 def testSearchCallSetIdsSystematic(self):
     for sampleIds in utils.powerset(self.vcfSamples, maxSets=10):
         self._verifyVariantsCallSetIds(list(sampleIds))
Example #6
0
 def testSearchCallSetIdsSystematic(self):
     for sampleIds in utils.powerset(self.vcfSamples, maxSets=10):
         # TODO remove this for protocol 0.6
         if len(sampleIds) == 0:
             sampleIds = self.vcfSamples
         self._verifyVariantsCallSetIds(None, list(sampleIds))