Skip to content

Commit

Permalink
move deprecated rawmode unpack tests to test_unpack_deprecated()
Browse files Browse the repository at this point in the history
  • Loading branch information
Yay295 committed Jun 22, 2024
1 parent 9ac9519 commit d763dc9
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions Tests/test_lib_pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,17 +321,12 @@ def get_unpack_parameters() -> (
("RGB", "RGB;16L", 6, [(2, 4, 6), (8, 10, 12)]),
("RGB", "RGB;16B", 6, [(1, 3, 5), (7, 9, 11)]),
("RGB", "BGR", 3, [(3, 2, 1), (6, 5, 4), (9, 8, 7)]),
("RGB", "RGB;15", 2, [(8, 131, 0), (24, 0, 8)]),
("RGB", "XRGB;1555", 2, [(0, 132, 8), (8, 0, 24)]),
("RGB", "ARGB;1555", 2, [(0, 132, 8), (8, 0, 24)]),
("RGB", "BGR;15", 2, [(0, 131, 8), (8, 0, 24)]),
("RGB", "XBGR;1555", 2, [(8, 132, 0), (24, 0, 8)]),
("RGB", "ABGR;1555", 2, [(8, 132, 0), (24, 0, 8)]),
("RGB", "RGB;16", 2, [(8, 64, 0), (24, 129, 0)]),
("RGB", "RGB;565", 2, [(0, 65, 8), (0, 130, 24)]),
("RGB", "BGR;16", 2, [(0, 64, 8), (0, 129, 24)]),
("RGB", "BGR;565", 2, [(8, 65, 0), (24, 130, 0)]),
("RGB", "RGB;4B", 2, [(17, 0, 34), (51, 0, 68)]),
("RGB", "XBGR;4", 2, [(17, 0, 34), (51, 0, 68)]),
("RGB", "ABGR;4", 2, [(17, 0, 34), (51, 0, 68)]),
("RGB", "RGBX", 4, [(1, 2, 3), (5, 6, 7), (9, 10, 11)]),
Expand Down Expand Up @@ -488,11 +483,8 @@ def get_unpack_parameters() -> (
],
),
("RGBA", "RGBA;L", 4, [(1, 4, 7, 10), (2, 5, 8, 11), (3, 6, 9, 12)]),
("RGBA", "RGBA;15", 2, [(8, 131, 0, 0), (24, 0, 8, 0)]),
("RGBA", "ARGB;1555", 2, [(0, 132, 8, 0), (8, 0, 24, 0)]),
("RGBA", "BGRA;15", 2, [(0, 131, 8, 0), (8, 0, 24, 0)]),
("RGBA", "ABGR;1555", 2, [(8, 132, 0, 0), (24, 0, 8, 0)]),
("RGBA", "RGBA;4B", 2, [(17, 0, 34, 0), (51, 0, 68, 0)]),
("RGBA", "ABGR;4", 2, [(17, 0, 34, 0), (51, 0, 68, 0)]),
("RGBA", "RGBA;16L", 8, [(2, 4, 6, 8), (10, 12, 14, 16)]),
("RGBA", "RGBA;16B", 8, [(1, 3, 5, 7), (9, 11, 13, 15)]),
Expand Down Expand Up @@ -555,13 +547,10 @@ def get_unpack_parameters() -> (
("RGBX", "RGB;L", 3, [(1, 4, 7, X), (2, 5, 8, X), (3, 6, 9, X)]),
("RGBX", "RGB;16B", 6, [(1, 3, 5, X), (7, 9, 11, X)]),
("RGBX", "BGR", 3, [(3, 2, 1, X), (6, 5, 4, X), (9, 8, 7, X)]),
("RGBX", "RGB;15", 2, [(8, 131, 0, X), (24, 0, 8, X)]),
("RGBX", "XRGB;1555", 2, [(0, 132, 8, X), (8, 0, 24, X)]),
("RGBX", "RGB;565", 2, [(0, 65, 8, X), (0, 130, 24, X)]),
("RGBX", "BGR;15", 2, [(0, 131, 8, X), (8, 0, 24, X)]),
("RGBX", "XBGR;1555", 2, [(8, 132, 0, X), (24, 0, 8, X)]),
("RGBX", "BGR;565", 2, [(8, 65, 0, X), (24, 130, 0, X)]),
("RGBX", "RGB;4B", 2, [(17, 0, 34, X), (51, 0, 68, X)]),
("RGBX", "XBGR;4", 2, [(17, 0, 34, X), (51, 0, 68, X)]),
("RGBX", "RGBX", 4, [(1, 2, 3, 4), (5, 6, 7, 8), (9, 10, 11, 12)]),
("RGBX", "RGBXX", 5, [(1, 2, 3, 4), (6, 7, 8, 9), (11, 12, 13, 14)]),
Expand Down Expand Up @@ -831,6 +820,19 @@ def test_unpack(
("BGR;15", "BGR;15", 3, [(8, 131, 0), (24, 0, 8), (41, 131, 8)]),
("BGR;16", "BGR;16", 3, [(8, 64, 0), (24, 129, 0), (41, 194, 0)]),
("BGR;24", "BGR;24", 3, [(1, 2, 3), (4, 5, 6), (7, 8, 9)]),
# Rawmode RGB/BGR/RGBA/BGRA 15/16/4B
("RGB", "RGB;15", 2, [(8, 131, 0), (24, 0, 8)]),
("RGB", "BGR;15", 2, [(0, 131, 8), (8, 0, 24)]),
("RGB", "RGB;16", 2, [(8, 64, 0), (24, 129, 0)]),
("RGB", "BGR;16", 2, [(0, 64, 8), (0, 129, 24)]),
("RGB", "RGB;4B", 2, [(17, 0, 34), (51, 0, 68)]),
("RGBA", "RGBA;15", 2, [(8, 131, 0, 0), (24, 0, 8, 0)]),
("RGBA", "BGRA;15", 2, [(0, 131, 8, 0), (8, 0, 24, 0)]),
("RGBA", "RGBA;4B", 2, [(17, 0, 34, 0), (51, 0, 68, 0)]),
("RGBX", "RGB;15", 2, [(8, 131, 0, X), (24, 0, 8, X)]),
("RGBX", "BGR;15", 2, [(0, 131, 8, X), (8, 0, 24, X)]),
("RGBX", "RGB;4B", 2, [(17, 0, 34, X), (51, 0, 68, X)]),
),
)
def test_unpack_deprecated(
Expand Down

0 comments on commit d763dc9

Please sign in to comment.