File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -93,6 +93,33 @@ def test_object_namehint(self):
9393 "house_lo.ogg" ,
9494 "house_lo.wav" ,
9595 "house_lo.mp3" ,
96+ ]
97+ data_fname = example_path ("data" )
98+ for file in filenames :
99+ path = os .path .join (data_fname , file )
100+ if os .sep == "\\ " :
101+ path = path .replace ("\\ " , "\\ \\ " )
102+ bmusfn = path .encode ()
103+
104+ * _ , format = file .split ("." )
105+
106+ # these two "with open" blocks need to be separate, which is kinda weird
107+ with open (bmusfn , "rb" ) as musf :
108+ pygame .mixer .music .load (musf , format )
109+
110+ with open (bmusfn , "rb" ) as musf :
111+ pygame .mixer .music .queue (musf , format )
112+
113+ with open (bmusfn , "rb" ) as musf :
114+ pygame .mixer .music .load (musf , namehint = format )
115+
116+ with open (bmusfn , "rb" ) as musf :
117+ pygame .mixer .music .queue (musf , namehint = format )
118+
119+ @unittest .skipIf (platform .system () == "Linux" , "fails on Linux for some reason." )
120+ def test_object_namehint_xm (self ):
121+ """TODO: fix this on Linux and merge with test_object_namehint."""
122+ filenames = [
96123 "surfonasinewave.xm" ,
97124 ]
98125 data_fname = example_path ("data" )
You can’t perform that action at this time.
0 commit comments