Skip to content
This repository has been archived by the owner on Dec 1, 2021. It is now read-only.

Commit

Permalink
#203 Change color to tuple from list to fix run.py error (#204)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruimashita committed Mar 29, 2019
1 parent 96de431 commit c96ac8e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
40 changes: 20 additions & 20 deletions lmnet/lmnet/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,26 @@ class Tasks(Enum):
# Sample image is here
# https://github.com/blue-oil/blueoil/tree/master/docs/_static/color_map.png
COLOR_MAP = [
[192, 0, 128], # COLOR00
[0, 128, 192], # COLOR01
[0, 128, 64], # COLOR02
[128, 0, 0], # COLOR03
[64, 0, 128], # COLOR04
[64, 0, 192], # COLOR05
[192, 128, 64], # COLOR06
[192, 192, 128], # COLOR07
[64, 64, 128], # COLOR08
[128, 0, 192], # COLOR09
[192, 0, 64], # COLOR10
[128, 128, 64], # COLOR11
[192, 0, 192], # COLOR12
[128, 64, 64], # COLOR13
[64, 192, 128], # COLOR14
[64, 64, 0], # COLOR15
[128, 64, 128], # COLOR16
[128, 128, 192], # COLOR17
[0, 0, 192], # COLOR18
[192, 128, 128] # COLOR19
(192, 0, 128), # COLOR00
(0, 128, 192), # COLOR01
(0, 128, 64), # COLOR02
(128, 0, 0), # COLOR03
(64, 0, 128), # COLOR04
(64, 0, 192), # COLOR05
(192, 128, 64), # COLOR06
(192, 192, 128), # COLOR07
(64, 64, 128), # COLOR08
(128, 0, 192), # COLOR09
(192, 0, 64), # COLOR10
(128, 128, 64), # COLOR11
(192, 0, 192), # COLOR12
(128, 64, 64), # COLOR13
(64, 192, 128), # COLOR14
(64, 64, 0), # COLOR15
(128, 64, 128), # COLOR16
(128, 128, 192), # COLOR17
(0, 0, 192), # COLOR18
(192, 128, 128) # COLOR19
]


Expand Down
8 changes: 4 additions & 4 deletions lmnet/tests/lmnet_tests/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
def test_get_color_map_with_small_length():
color_map = get_color_map(5)
assert len(color_map) == 5
assert color_map[0] == [192, 0, 128]
assert color_map[4] == [64, 0, 128]
assert color_map[0] == (192, 0, 128)
assert color_map[4] == (64, 0, 128)


def test_get_color_map_with_large_length():
color_map = get_color_map(30)
assert len(color_map) == 30
assert color_map[0] == [192, 0, 128]
assert color_map[29] == [128, 0, 192]
assert color_map[0] == (192, 0, 128)
assert color_map[29] == (128, 0, 192)

0 comments on commit c96ac8e

Please sign in to comment.