def test_afw_complementation(self):
""" Test a correct afw complementation comparing the language read,
that must be discording"""
afw_complemented = AFW.afw_complementation(
self.afw_complementation_test_01)
i = 0
last = 7
while i <= last:
base = list(itertools.repeat('a', i))
base += list(itertools.repeat('b', i))
# build all permutation of 'a' and 'b' till length i
word_set = set(itertools.permutations(base, i))
for word in word_set:
word = list(word)
afw_acceptance = AFW.afw_word_acceptance(
self.afw_complementation_test_01, word)
complement_acceptance = AFW.afw_word_acceptance(
afw_complemented, word)
self.assertNotEqual(afw_acceptance, complement_acceptance)
i += 1
评论列表
文章目录