mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
Add AR, AG, AB test case and fix behavior
This commit is contained in:
parent
526e5bfabb
commit
5917671521
2 changed files with 24 additions and 1 deletions
|
|
@ -389,7 +389,7 @@ def get_review_info_by_layer_name(channel_names):
|
|||
layer_names_order.append(layer_name)
|
||||
|
||||
# R, G, B, A or X, Y, Z, N, AR, AG, AB
|
||||
channel = last_part[0].upper()
|
||||
channel = last_part.upper()
|
||||
channels_by_layer_name[layer_name][channel] = channel_name
|
||||
|
||||
# Put empty layer to the beginning of the list
|
||||
|
|
|
|||
|
|
@ -82,6 +82,29 @@ class GetReviewInfoByLayerName(unittest.TestCase):
|
|||
}
|
||||
}])
|
||||
|
||||
def test_ar_ag_ab_channels(self):
|
||||
|
||||
info = get_review_info_by_layer_name(["AR", "AG", "AB"])
|
||||
self.assertEqual(info, [{
|
||||
"name": "",
|
||||
"review_channels": {
|
||||
"R": "AR",
|
||||
"G": "AG",
|
||||
"B": "AB",
|
||||
"A": None,
|
||||
}
|
||||
}])
|
||||
|
||||
info = get_review_info_by_layer_name(["AR", "AG", "AB", "A"])
|
||||
self.assertEqual(info, [{
|
||||
"name": "",
|
||||
"review_channels": {
|
||||
"R": "AR",
|
||||
"G": "AG",
|
||||
"B": "AB",
|
||||
"A": "A",
|
||||
}
|
||||
}])
|
||||
|
||||
def test_unknown_channels(self):
|
||||
info = get_review_info_by_layer_name(["hello", "world"])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue