Adopt Pixaroma image node batch features
This commit is contained in:
@@ -78,11 +78,28 @@ class DumasImageNodeTests(unittest.TestCase):
|
||||
self.assertEqual(result["ui"]["images"], [])
|
||||
self.assertIsNone(result["result"][0])
|
||||
|
||||
def test_compare_preview_names_are_unique(self):
|
||||
first = self.nodes.DumasImageCompareNode().compare_images(FakeBatch())
|
||||
second = self.nodes.DumasImageCompareNode().compare_images(FakeBatch())
|
||||
self.assertNotEqual(
|
||||
first["ui"]["images"][0]["filename"],
|
||||
second["ui"]["images"][0]["filename"],
|
||||
)
|
||||
|
||||
def test_load_folder_node_has_expected_outputs(self):
|
||||
self.assertEqual(
|
||||
self.nodes.DumasLoadImagesFolderNode.RETURN_NAMES,
|
||||
("image", "mask", "width", "height", "filename", "index", "total"),
|
||||
("image", "mask", "width", "height", "filename", "index", "total", "path"),
|
||||
)
|
||||
self.assertEqual(self.nodes.DumasLoadImagesFolderNode.OUTPUT_IS_LIST, (True,) * 8)
|
||||
|
||||
def test_folder_listing_includes_thumbnail_metadata(self):
|
||||
with tempfile.TemporaryDirectory() as directory:
|
||||
path = os.path.join(directory, "frame.png")
|
||||
open(path, "wb").close()
|
||||
files = self.nodes._list_folder_image_files(directory)
|
||||
self.assertEqual(files[0]["file"], "frame.png")
|
||||
self.assertIn("mtime", files[0])
|
||||
|
||||
def test_counter_uses_highest_existing_file(self):
|
||||
with tempfile.TemporaryDirectory() as directory:
|
||||
|
||||
Reference in New Issue
Block a user