Snapshot permission updates.
This commit is contained in:
1 parent
414380740f
commit
d570b16b60
15 files changed
+540
-502
No files matched your search
+46
-27
@@ -1,27 +1,46 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import unittest
|
||||
|
||||
import solver
|
||||
|
||||
|
||||
class TestSolver(unittest.TestCase):
|
||||
def test_SimilaritySolver(self):
|
||||
"""Minimal end to end test."""
|
||||
|
||||
solve = solver.SimilaritySolver()
|
||||
result = solve.scored_words()
|
||||
|
||||
expected = [
|
||||
("cares", 139631),
|
||||
("sanes", 139129),
|
||||
("tares", 138755),
|
||||
("bares", 138375),
|
||||
("sales", 137491),
|
||||
]
|
||||
|
||||
self.assertListEqual(result[:5], expected)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
#!/usr/bin/python
|
||||
|
||||
import unittest
|
||||
|
||||
import dictionary
|
||||
import solver
|
||||
|
||||
test_dictionary = dictionary.words()
|
||||
|
||||
|
||||
class TestSolver(unittest.TestCase):
|
||||
def test_SimilaritySolver(self):
|
||||
"""Minimal end to end test."""
|
||||
|
||||
solve = solver.SimilaritySolver()
|
||||
result = solve.scored_words(test_dictionary)
|
||||
|
||||
expected = [
|
||||
("cares", 139631),
|
||||
("sanes", 139129),
|
||||
("tares", 138755),
|
||||
("bares", 138375),
|
||||
("sales", 137491),
|
||||
]
|
||||
|
||||
self.assertListEqual(result[:5], expected)
|
||||
|
||||
def test_LimitsSolver(self):
|
||||
"""Minimal end to end test."""
|
||||
|
||||
solve = solver.LimitsSolver()
|
||||
result = solve.scored_words(test_dictionary)
|
||||
|
||||
expected = [
|
||||
("aahed", 5),
|
||||
("aalii", 5),
|
||||
("aargh", 5),
|
||||
("aaron", 5),
|
||||
("abaca", 5),
|
||||
]
|
||||
|
||||
self.assertListEqual(result[:5], expected)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in new issue
Block a user