Move string permutation to a class

This commit is contained in:
Donne Martin
2016-08-13 06:39:19 -04:00
parent aa887db2e0
commit 22e3549d7d
3 changed files with 39 additions and 26 deletions

View File

@@ -14,9 +14,11 @@ class TestPermutation(object):
def main():
test = TestPermutation()
test.test_permutation(permutations)
permutations = Permutations()
test.test_permutation(permutations.is_permutation)
try:
test.test_permutation(permutations_alt)
permutations_alt = PermutationsAlt()
test.test_permutation(permutations_alt.is_permutation)
except NameError:
# Alternate solutions are only defined
# in the solutions file