Merge branch 'blender-v3.6-release' #104736
@ -101,7 +101,7 @@ def files_to_clean_file_names_for_sockets(files, sockets):
|
||||
socket_tags = socket[1]
|
||||
all_tags.update(socket_tags)
|
||||
|
||||
while True:
|
||||
while len(names_to_tag_lists) > 1:
|
||||
something_changed = False
|
||||
|
||||
# Common prefixes / suffixes provide zero information about what file
|
||||
|
@ -253,6 +253,38 @@ class TestPutFileNamesInSockets(unittest.TestCase):
|
||||
},
|
||||
)
|
||||
|
||||
def test_single_file_good(self):
|
||||
"""Regression test for https://projects.blender.org/blender/blender-addons/issues/104573"""
|
||||
|
||||
files = [
|
||||
MockFile("banana-color.webp"),
|
||||
]
|
||||
sockets = sockets_fixture()
|
||||
match_files_to_socket_names(files, sockets)
|
||||
|
||||
assert_sockets(
|
||||
self,
|
||||
sockets,
|
||||
{
|
||||
"Base Color": "banana-color.webp",
|
||||
},
|
||||
)
|
||||
|
||||
def test_single_file_bad(self):
|
||||
"""Regression test for https://projects.blender.org/blender/blender-addons/issues/104573"""
|
||||
|
||||
files = [
|
||||
MockFile("README-banana.txt"),
|
||||
]
|
||||
sockets = sockets_fixture()
|
||||
match_files_to_socket_names(files, sockets)
|
||||
|
||||
assert_sockets(
|
||||
self,
|
||||
sockets,
|
||||
{},
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main(verbosity=2)
|
||||
|
Loading…
Reference in New Issue
Block a user