@@ -11,14 +11,20 @@ class TestTexture(unittest.TestCase):
1111
1212 def testPathedImageName (self ):
1313 """For Texture objects, the image name should be the last component of the path."""
14- my_texture = pywavefront .texture .Texture ('4x4.png' , search_path = utils .FIXTURE_PATH )
15- self .assertEqual (my_texture .path , str (utils .fixture ('4x4.png' )))
16- self .assertEqual (my_texture .name , '4x4.png' )
14+ texture = pywavefront .texture .Texture ('4x4.png' , search_path = utils .FIXTURE_PATH )
15+ self .assertEqual (texture .path , str (utils .fixture ('4x4.png' )))
16+ self .assertEqual (texture .name , '4x4.png' )
17+ self .assertTrue (texture )
18+ self .assertEqual (texture .image_name , '4x4.png' )
19+ self .assertEqual (texture .file_name , '4x4.png' )
20+ self .assertTrue (os .path .exists (texture .find ()))
1721
1822 def testMissingFile (self ):
1923 """Referencing a missing texture file should raise an exception."""
2024 texture = pywavefront .texture .Texture ('missing.file.do.not.create' , search_path = '' )
2125 self .assertFalse (texture .exists ())
26+ with self .assertRaises (FileNotFoundError ):
27+ texture .find ()
2228
2329 def testPathVsName (self ):
2430 texture = pywavefront .texture .Texture ('somefile' , search_path = Path ('path/to' ))
0 commit comments