#NEWLINE# def test_getsitepackages( self ) : #NEWLINE# #INDENT# site . PREFIXES = [ 'xoxo' ] #NEWLINE# dirs = site . getsitepackages ( ) #NEWLINE# if ( ( sys . platform in ( 'os2emx' , 'riscos' ) ) or is_jython ) : #NEWLINE# #INDENT# self . assertEqual ( len ( dirs ) , 1 ) #NEWLINE# wanted = os . path . join ( 'xoxo' , 'Lib' , 'site-packages' ) #NEWLINE# self . assertEqual ( dirs [ 0 ] , wanted ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( sys . platform == 'darwin' ) and sysconfig . get_config_var ( 'PYTHONFRAMEWORK' ) ) : #NEWLINE# #INDENT# site . PREFIXES = [ 'Python.framework' ] #NEWLINE# dirs = site . getsitepackages ( ) #NEWLINE# self . assertEqual ( len ( dirs ) , 3 ) #NEWLINE# wanted = os . path . join ( '/Library' , sysconfig . get_config_var ( 'PYTHONFRAMEWORK' ) , sys . version [ : 3 ] , 'site-packages' ) #NEWLINE# self . assertEqual ( dirs [ 2 ] , wanted ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( os . sep == '/' ) : #NEWLINE# #INDENT# self . assertEqual ( len ( dirs ) , 2 ) #NEWLINE# wanted = os . path . join ( 'xoxo' , 'lib' , ( 'python' + sys . version [ : 3 ] ) , 'site-packages' ) #NEWLINE# self . assertEqual ( dirs [ 0 ] , wanted ) #NEWLINE# wanted = os . path . join ( 'xoxo' , 'lib' , 'site-python' ) #NEWLINE# self . assertEqual ( dirs [ 1 ] , wanted ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . assertEqual ( len ( dirs ) , 2 ) #NEWLINE# self . assertEqual ( dirs [ 0 ] , 'xoxo' ) #NEWLINE# wanted = os . path . join ( 'xoxo' , 'lib' , 'site-packages' ) #NEWLINE# self . assertEqual ( dirs [ 1 ] , wanted )