def test_not_compatible_different_lengths(self): b1 = BloomFilter(length=10, random_seed=2) b2 = BloomFilter(length=15, random_seed=2) with self.assertRaises(AssertionError): b1.assert_compatible(b2) with self.assertRaises(AssertionError): b2.assert_compatible(b1)
def test_compatible(self): b1 = BloomFilter(length=15, random_seed=2) b2 = BloomFilter(length=15, random_seed=2) self.assertTrue(b1.assert_compatible(b2)) self.assertTrue(b2.assert_compatible(b1))