Current Path : /usr/lib/python2.7/dist-packages/twisted/scripts/test/ |
Current File : //usr/lib/python2.7/dist-packages/twisted/scripts/test/test_scripts.pyc |
ypNc @ s d Z d d l m Z m Z m Z d d l m Z d d l m Z m Z d d l m Z m Z d d l m Z d d l m Z d d l m Z d d d YZ d e e f d YZ d e e f d YZ d S( s Tests for the command-line scripts in the top-level I{bin/} directory. Tests for actual functionality belong elsewhere, written in a way that doesn't involve launching child processes. i( t devnullt getcwdt chdir( t executable( t PIPEt Popen( t SkipTestt TestCase( t getModule( t FilePath( t ZshScriptTestMixint ScriptTestsMixinc B s2 e Z d Z e d j j j d Z d Z RS( sr Mixin for L{TestCase} subclasses which defines a helper function for testing a Twisted-using script. t twistedt binc C s | j j | } | j s- t d n d d l m } t t | j d g d t d t t j j } | j t | | d S( s Verify that the given script runs and uses the version of Twisted currently being tested. This only works when running tests against a vcs checkout of Twisted, since it relies on the scripts being in the place they are kept in version control, and exercises their logic for finding the right version of Twisted to use in that situation. @param name: A path fragment, relative to the I{bin} directory of a Twisted source checkout, identifying a script to test. @type name: C{str} @raise SkipTest: if the script is not where it is expected to be. s5 Script tests do not apply to installed configuration.i( t versions --versiont stdoutt stderrN( R t preauthChildt existsR t twisted.copyrightR R R t pathR t fileR R t readt assertInt str( t selft namet scriptR t scriptVersion( ( sE /usr/lib/python2.7/dist-packages/twisted/scripts/test/test_scripts.pyt scriptTest s ( t __name__t __module__t __doc__R t pathEntryt filePatht childR R ( ( ( sE /usr/lib/python2.7/dist-packages/twisted/scripts/test/test_scripts.pyR s t ScriptTestsc B sh e Z d Z d Z d Z d Z d Z d Z d Z d Z d Z d Z d Z RS( s% Tests for the core scripts. c C s | j d d S( Nt twistd( R ( R ( ( sE /usr/lib/python2.7/dist-packages/twisted/scripts/test/test_scripts.pyt test_twistd>