renamed pattern test functions to be more meaningful

This commit is contained in:
Stephen McQuay 2011-02-15 11:12:56 -07:00
parent 28711318d5
commit 6bc5908a9b
3 changed files with 4 additions and 15 deletions

View File

@ -1,9 +0,0 @@
#!/usr/bin/env python
from interp.baker import pattern
from interp.tools import log
log.info(pattern(power = 2, phicount = 3, offset = -1))
log.info(pattern(power = 2, phicount = 4, offset = -1))
log.info(pattern(power = 3, phicount = 3, offset = -1))
log.info(pattern(power = 3, phicount = 4, offset = -1))

View File

@ -39,8 +39,6 @@ if __name__ == '__main__':
print "total points", total_points
d = {True: 0, False: 0}
good = []
bad = []

View File

@ -12,17 +12,17 @@ class TestSequenceFunctions(unittest.TestCase):
def testImports(self):
from interp.baker import pattern
def test0(self):
def test_baker_eq_8(self):
b = sorted([tuple(sorted(i)) for i in ((1,2),(2,3),(3,1))])
p = sorted(pattern(power = 2, phicount = 3))
self.assertEqual(b,p)
def test1(self):
def test_baker_eq_17(self):
b = sorted([tuple(sorted(i)) for i in ((1,2,2), (1,3,3), (2,1,1), (2,3,3), (3,1,1), (3,2,2), (1,2,3))])
p = sorted(pattern(power = 3, phicount = 3))
self.assertEqual(b,p)
def test2(self):
def test_baker_eq_15(self):
b = sorted([tuple(sorted(i)) for i in (
(1,2), (1,3), (1,4),
(2,3), (2,4), (3,4))])
@ -31,7 +31,7 @@ class TestSequenceFunctions(unittest.TestCase):
self.assertEqual(b,p)
def test3(self):
def test_smcquay_(self):
b = sorted([tuple(sorted(i)) for i in (
(1,2,3), (2,3,4), (1,2,4), (1,3,4),
(1,1,2), (1,2,2),