mirror of https://github.com/kivy/kivy.git
UnitTest: forgot to add file test_image.py
This commit is contained in:
parent
3074b8fcb6
commit
d63afce956
|
@ -0,0 +1,16 @@
|
|||
import unittest
|
||||
|
||||
|
||||
class ImageTestCase(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
from kivy.core.image import Image
|
||||
self.cls = Image
|
||||
self.root = Image('test_button.png')
|
||||
|
||||
def test_keep_data(self):
|
||||
root = self.root
|
||||
self.assertEqual(root._image._data[0].data, None)
|
||||
i1 = self.cls('test_button.png', keep_data = True)
|
||||
if not i1._image._data[0].data:
|
||||
self.fail('Image has no data even with keep_data = True')
|
Loading…
Reference in New Issue