Skip to content

Commit

Permalink
Fix all color failures
Browse files Browse the repository at this point in the history
  • Loading branch information
rec committed Dec 25, 2015
1 parent 58620ad commit d38980d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
15 changes: 8 additions & 7 deletions code/python/echomesh/color/ColorList_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,24 +52,25 @@ def test_combine_columns(self):
columns=2)
self.cl.combine(ColorList(['yellow', 'white', 'black', 'green', 'red'],
columns=3))
self.assertResult('[\n [yellow, white, black],\n'
' [yellow, magenta, black],\n'
' [green, black, black]]')
self.assertResult(
'[yellow, white, black,'
' yellow, magenta, black,'
' green, black, black], columns=3')

def test_combine_columns2(self):
self.cl = ColorList(['yellow', 'white', 'red', 'blue', 'green'],
columns=3)
self.cl.combine(ColorList(['yellow', 'white', 'red', 'green', 'coral'],
columns=2))
self.assertResult('[\n [yellow, white, red],\n'
' [magenta, green, black],\n'
' [coral, black, black]]')
self.assertResult(
'[yellow, white, red, magenta, green, black, coral, black, black]'
', columns=3')

def test_combine_columns4(self):
self.cl = ColorList()
self.cl.combine(ColorList(['yellow', 'white', 'red', 'green', 'coral'],
columns=2))
self.assertResult('[\n [yellow, white],\n [red, green],\n [coral]]')
self.assertResult('[yellow, white, red, green, coral], columns=2')

def test_count(self):
self.cl.extend(['green', 'red', 'blue', 'red', 'pink'])
Expand Down
5 changes: 3 additions & 2 deletions code/python/echomesh/color/Scroll_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def setUp(self):

def doTest(self, dx, dy, expected):
result = cechomesh.scroll_color_list(self.data, dx, dy, columns=4)
expected = cechomesh.ColorList(expected, columns=4)
expected = cechomesh.ColorList(expected) # , columns=4)
self.assertEquals(result, expected)

def test_empty(self):
Expand Down Expand Up @@ -129,7 +129,8 @@ def test_up_left(self):

def doWrapTest(self, dx, dy, expected):
result = cechomesh.scroll_color_list(self.data, dx, dy, 4, wrap=True)
expected = cechomesh.ColorList(expected, columns=4)
expected = cechomesh.ColorList(expected)
# , columns=4) why was this there
self.assertEquals(result, expected)

def test_empty_wrap(self):
Expand Down

0 comments on commit d38980d

Please sign in to comment.