'The twistd script adds the current working directory to sys.path so
that it\'s able to import modules from it.'

def test_twistdPathInsert(self):

    script = self.bin.child('twistd')
    if (not script.exists()):
        raise SkipTest('Script    tests    do    not    apply    to    installed    configuration.')
    cwd = getcwd()
    self.addCleanup(chdir, cwd)
    testDir = FilePath(self.mktemp())
    testDir.makedirs()
    chdir(testDir.path)
    testDir.child('bar.tac').setContent('import    sys\nprint    sys.path\n')
    output = outputFromPythonScript(script, '-ny', 'bar.tac')
    self.assertIn(repr(testDir.path), output)
