Fix the test.fib tests

This commit is contained in:
Colton Myers 2015-04-11 14:48:48 -04:00
parent db76878903
commit cc8785e980
4 changed files with 11 additions and 14 deletions

View File

@ -28,9 +28,9 @@ class TestSyndic(integration.SyndicCase):
self.assertEqual( self.assertEqual(
self.run_function( self.run_function(
'test.fib', 'test.fib',
['40'], ['20'],
)[0][-1], )[0],
34 6765
) )

View File

@ -88,10 +88,10 @@ class PublishModuleTest(integration.ModuleCase,
''' '''
ret = self.run_function( ret = self.run_function(
'publish.full_data', 'publish.full_data',
['minion', 'test.fib', 40] ['minion', 'test.fib', 20]
) )
self.assertTrue(ret) self.assertTrue(ret)
self.assertEqual(ret['minion']['ret'][0][-1], 34) self.assertEqual(ret['minion']['ret'][0], 6765)
def test_kwarg(self): def test_kwarg(self):
''' '''

View File

@ -73,9 +73,9 @@ class TestModuleTest(integration.ModuleCase,
self.assertEqual( self.assertEqual(
self.run_function( self.run_function(
'test.fib', 'test.fib',
['40'], ['20'],
)[0][-1], )[0],
34 6765
) )
def test_collatz(self): def test_collatz(self):

View File

@ -34,18 +34,15 @@ class CallTest(integration.ShellCase, integration.ShellCaseCommonTestsMixIn):
out = self.run_call('-l quiet test.fib 3') out = self.run_call('-l quiet test.fib 3')
expect = ['local:', expect = ['local:',
' |_', ' - 2',
' - 0', ' - 3.09944152832e-06',]
' - 1',
' - 1',
' - 2']
self.assertEqual(expect, out[:-1]) self.assertEqual(expect, out[:-1])
def test_text_output(self): def test_text_output(self):
out = self.run_call('-l quiet --out txt test.fib 3') out = self.run_call('-l quiet --out txt test.fib 3')
expect = [ expect = [
'local: ([0, 1, 1, 2]' 'local: (2,'
] ]
self.assertEqual(''.join(expect), ''.join(out).rsplit(",", 1)[0]) self.assertEqual(''.join(expect), ''.join(out).rsplit(",", 1)[0])