@@ -66,28 +66,28 @@ def test_sprite():
6666 del test_texture2d
6767 del test_sprite
6868
69- # def test_audioclip():
70- # # as not platforms are supported by FMOD
71- # # we have to check if the platform is supported first
72- # try:
73- # from UnityPy.export import AudioClipConverter
74-
75- # AudioClipConverter.import_pyfmodex()
76- # except NotImplementedError:
77- # return
78- # except OSError:
79- # # cibuildwheel doesn't copy the .so files
80- # # so we have to skip the test on it
81- # print("Failed to load the fmod lib for your system.")
82- # print("Skipping the audioclip test.")
83- # return
84- # if AudioClipConverter.pyfmodex is False:
85- # return
86- # env = UnityPy.load(os.path.join(SAMPLES, "char_118_yuki.ab"))
87- # for obj in env.objects:
88- # if obj.type.name == "AudioClip":
89- # clip = obj.read()
90- # assert len(clip.samples) == 1
69+ def test_audioclip ():
70+ # as not platforms are supported by FMOD
71+ # we have to check if the platform is supported first
72+ try :
73+ from UnityPy .export import AudioClipConverter
74+
75+ AudioClipConverter .import_pyfmodex ()
76+ except NotImplementedError :
77+ return
78+ except OSError :
79+ # cibuildwheel doesn't copy the .so files
80+ # so we have to skip the test on it
81+ print ("Failed to load the fmod lib for your system." )
82+ print ("Skipping the audioclip test." )
83+ return
84+ if AudioClipConverter .pyfmodex is False :
85+ return
86+ env = UnityPy .load (os .path .join (SAMPLES , "char_118_yuki.ab" ))
87+ for obj in env .objects :
88+ if obj .type .name == "AudioClip" :
89+ clip = obj .read ()
90+ assert len (clip .samples ) == 1
9191
9292
9393def test_mesh ():
0 commit comments