@@ -42,3 +42,35 @@ def testPathVsName(self):
4242
4343 texture .path = "some/path"
4444 self .assertEqual (texture .path , str (Path ('some/path' )))
45+
46+ def test_options (self ):
47+ params = [
48+ '-blendu on' ,
49+ '-blendv on' ,
50+ '-bm 1.0' ,
51+ '-boost 0.0' ,
52+ '-cc off' ,
53+ '-clamp off' ,
54+ '-imfchan l' ,
55+ '-mm 0.0 1.0' ,
56+ '-o 0.0 0.0 0.0' ,
57+ '-s 1.0 1.0 1.0' ,
58+ '-t 0.0 0.0 0.0' ,
59+ '-texres 1024' ,
60+ 'path/to/sometexture.png' ,
61+ ]
62+ texture = pywavefront .texture .Texture (' ' .join (params ) , '' )
63+ opts = texture .options
64+ self .assertEqual (opts .name , 'path/to/sometexture.png' )
65+ self .assertEqual (opts .blendu , 'on' )
66+ self .assertEqual (opts .blendv , 'on' )
67+ self .assertEqual (opts .bm , 1.0 )
68+ self .assertEqual (opts .boost , 0.0 )
69+ self .assertEqual (opts .cc , 'off' )
70+ self .assertEqual (opts .clamp , 'off' )
71+ self .assertEqual (opts .imfchan , 'l' )
72+ self .assertEqual (opts .mm , (0.0 , 1.0 ))
73+ self .assertEqual (opts .o , (0.0 , 0.0 , 0.0 ))
74+ self .assertEqual (opts .s , (1.0 , 1.0 , 1.0 ))
75+ self .assertEqual (opts .t , (0.0 , 0.0 , 0.0 ))
76+ self .assertEqual (opts .texres , '1024' )
0 commit comments