Beispiel #1
0
 def test_frame_added(self):
     img = Image.new("RGBA", (1920, 1080))
     ifi = ImageFrameItem(img, frame_added=5)
     self.assertEqual(ifi.frame_added, 5)
Beispiel #2
0
 def test_frames_to_live(self):
     img = Image.new("RGBA", (1920, 1080))
     ifi = ImageFrameItem(img, frames_to_live=10)
     self.assertEqual(ifi.frames_to_live, 10)
Beispiel #3
0
 def test_height(self):
     img = Image.new("RGBA", (1920, 1080))
     ifi = ImageFrameItem(img, height=5)
     self.assertEqual(ifi.height, 5)
Beispiel #4
0
 def test_current_frame(self):
     img = Image.new("RGBA", (1920, 1080))
     ifi = ImageFrameItem(img, current_frame=5)
     self.assertEqual(ifi.current_frame, 5)
Beispiel #5
0
 def test_default_x(self):
     img = Image.new("RGBA", (1920, 1080))
     ifi = ImageFrameItem(img)
     self.assertEqual(ifi.x, 0)
Beispiel #6
0
 def test_width(self):
     img = Image.new("RGBA", (1920, 1080))
     ifi = ImageFrameItem(img, width=5)
     self.assertEqual(ifi.width, 5)
Beispiel #7
0
 def test_y(self):
     img = Image.new("RGBA", (1920, 1080))
     ifi = ImageFrameItem(img, y=5)
     self.assertEqual(ifi.y, 5)
Beispiel #8
0
 def test_current_frame_increment(self):
     img = Image.new("RGBA", (1920, 1080))
     ifi = ImageFrameItem(img, current_frame=10)
     ifi.increment_current_frame()
     self.assertEqual(ifi.current_frame, 11)
Beispiel #9
0
 def test_default_width(self):
     img = Image.new("RGBA", (1920, 1080))
     ifi = ImageFrameItem(img)
     self.assertEqual(ifi.width, 3840)