#NEWLINE# def test_unicode_libraries( ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# unicode #NEWLINE# #UNINDENT# except NameError : #NEWLINE# #INDENT# py . test . skip ( 'for python 2.x' ) #NEWLINE# #UNINDENT# import math #NEWLINE# lib_m = 'm' #NEWLINE# if ( sys . platform == 'win32' ) : #NEWLINE# #INDENT# import distutils.ccompiler #NEWLINE# if ( distutils . ccompiler . get_default_compiler ( ) == 'msvc' ) : #NEWLINE# #INDENT# lib_m = 'msvcrt' #NEWLINE# #UNINDENT# #UNINDENT# ffi = FFI ( ) #NEWLINE# ffi . cdef ( unicode ( 'float sin(double); double cos(double);' ) ) #NEWLINE# lib = verify ( ffi , 'test_math_sin_unicode' , unicode ( '#include <math.h>' ) , libraries = [ unicode ( ffi ) ] ) #NEWLINE# assert ( lib . cos ( 1.43 ) == math . cos ( 1.43 ) )