diff pyntnclick/tests/test_resources.py @ 571:20e296d4a3a5 pyntnclick

Add load_image to Resources.
author Jeremy Thurgood <firxen@gmail.com>
date Sat, 11 Feb 2012 15:48:04 +0200
parents f22953c43c6d
children 85f1ab8af698
line wrap: on
line diff
--- a/pyntnclick/tests/test_resources.py	Sat Feb 11 15:48:06 2012 +0200
+++ b/pyntnclick/tests/test_resources.py	Sat Feb 11 15:48:04 2012 +0200
@@ -1,6 +1,8 @@
 import os.path
 from unittest import TestCase
 
+from pygame.surface import Surface
+
 from pyntnclick.resources import Resources, ResourceNotFound
 
 
@@ -40,3 +42,9 @@
         res = Resources('pyntnclick.tests')
         self.assertEqual(data_path('images/pyntnclick/hand.png'),
                          res.get_resource_path('images/pyntnclick/hand.png'))
+
+    def test_load_image(self):
+        res = Resources('pyntnclick.tests')
+        res.CONVERT_ALPHA = False
+        image = res.load_image('pyntnclick/hand.png')
+        self.assertTrue(isinstance(image, Surface))