Plan 9 from Bell Labs’s /usr/web/sources/contrib/jas/root/sys/lib/python2.7/site-packages/nose/pyversion.pyc

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


�9�c	@s�dZddlZddlZddlZddlZddlZddddddd	d
dg	Zee	��ee
��kZyddlZd�Z
Wnek
r�d
�Z
nXd�Zejd#kr�ed�Zned�Zeed�rejZejZneZeZdd$d��YZdd%d��YZd�Zd�Zejd&krpdd�Zndd�Zejd d'kr�d�Zn7ydd lmZWnek
r�d!ZnXd"�ZdS((sP
This module contains fixups for using nose under different versions of Python.
i�Ntmake_instancemethodt
cmp_to_keyt	sort_listt	ClassTypetTypeTypetUNICODE_STRINGStunbound_methodtismethodtbytes_cCstj|j||j�S(N(tnewtinstancemethodtim_funct	__class__(tfunctiontinstance((s2/sys/lib/python2.7/site-packages/nose/pyversion.pyRscCs|j||j�S(N(t__get__R(R
R((s2/sys/lib/python2.7/site-packages/nose/pyversion.pyRscs dtf�fd��Y}|S(s,Convert a cmp= function into a key= functiontKeycs>eZd�Z�fd�Z�fd�Z�fd�ZRS(cSs
||_dS(N(tobj(tselfR((s2/sys/lib/python2.7/site-packages/nose/pyversion.pyt__init__$scs�|j|j�dkS(Ni(R(Rtother(tmycmp(s2/sys/lib/python2.7/site-packages/nose/pyversion.pyt__lt__&scs�|j|j�dkS(Ni(R(RR(R(s2/sys/lib/python2.7/site-packages/nose/pyversion.pyt__gt__(scs�|j|j�dkS(Ni(R(RR(R(s2/sys/lib/python2.7/site-packages/nose/pyversion.pyt__eq__*s(t__name__t
__module__RRRR((R(s2/sys/lib/python2.7/site-packages/nose/pyversion.pyR#s	(tobject(RR((Rs2/sys/lib/python2.7/site-packages/nose/pyversion.pyR!s	iics6|r|j�fd��S|j�fd��SdS(Ncst�|��|��S(N(tcmp(tatb(tkey(s2/sys/lib/python2.7/site-packages/nose/pyversion.pyt<lambda>3scst�|��|��S(N(R(RR(R(s2/sys/lib/python2.7/site-packages/nose/pyversion.pyR 5s(tsort(tlRtreverse((Rs2/sys/lib/python2.7/site-packages/nose/pyversion.pyR1scCs|jd|d|�S(NRR#(R!(R"RR#((s2/sys/lib/python2.7/site-packages/nose/pyversion.pyR7st
UnboundMethodcBs5eZd�Zd�Zd�Zd�Zd�ZRS(cCs.|jj�|_||_t|�|_dS(N(t__dict__tcopyt_functUnboundSelft__self__(Rtclstfunc((s2/sys/lib/python2.7/site-packages/nose/pyversion.pyRHs	cCs�|jj}|j}tj|}t|dd�}|dk	rUtjj	|�}nt
jj|�|d|j
|jj
ffS(Nt__file__s%s.%s(R)R*RtsystmodulestgetattrtNonetostpathtabspathtnosetutiltsrcRR'(RR*tmodnametmoduletfilename((s2/sys/lib/python2.7/site-packages/nose/pyversion.pytaddressOs	
cOs|j||�S(N(R'(Rtargstkwargs((s2/sys/lib/python2.7/site-packages/nose/pyversion.pyt__call__YscCst|j|�S(N(R/R'(Rtattr((s2/sys/lib/python2.7/site-packages/nose/pyversion.pyt__getattr__\scCsd|jjj|jjfS(Ns<unbound method %s.%s>(R)R*RR'(R((s2/sys/lib/python2.7/site-packages/nose/pyversion.pyt__repr___s(RRRR:R=R?R@(((s2/sys/lib/python2.7/site-packages/nose/pyversion.pyR$Gs
		
		R(cBseZd�Zd�ZRS(cCs
||_dS(N(R*(RR*((s2/sys/lib/python2.7/site-packages/nose/pyversion.pyRdscCs'|dkr|jStj||�SdS(NR(R*Rt__getattribute__(RR>((s2/sys/lib/python2.7/site-packages/nose/pyversion.pyRAis(RRRRA(((s2/sys/lib/python2.7/site-packages/nose/pyversion.pyR(cs	cCsKtj|�r|Stj|�s>tdt|�f��nt||�S(Ns%s is not a function(tinspectRt
isfunctiont	TypeErrortreprR$(R*R+((s2/sys/lib/python2.7/site-packages/nose/pyversion.pyRos
cCstj|�pt|t�S(N(RBRt
isinstanceR$(R((s2/sys/lib/python2.7/site-packages/nose/pyversion.pyRvsiitutf8cCs t|t�r|St||�S(N(RFtbytes(tstencoding((s2/sys/lib/python2.7/site-packages/nose/pyversion.pyR|scCs
t|�S(N(tstr(RIRJ((s2/sys/lib/python2.7/site-packages/nose/pyversion.pyR�sicCs7t|t�r|j}ntj|�p6tj|�S(N(RFR$R'RBtisgeneratorfunctiontisgenerator(to((s2/sys/lib/python2.7/site-packages/nose/pyversion.pyRM�s(tCO_GENERATORi cCs1y|jjt@dkSWntk
r,tSXdS(Ni(t	func_codetco_flagsROtAttributeErrortFalse(R+((s2/sys/lib/python2.7/site-packages/nose/pyversion.pyRM�s
(ii(((ii(ii(t__doc__R-R1ttypesRBt	nose.utilR4t__all__ttypetunicodeRKRR	RtImportErrorRtversion_infoRSRthasattrRRR$R(RRRR0RMtcompiler.constsRO(((s2/sys/lib/python2.7/site-packages/nose/pyversion.pyt<module>sJ	


				



Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.