title: Python code running python invoke not executing tasks
body: <p>Given the following tasks.py</p>
  
  <pre><code>from invoke import run, task
  
  @task
  def gems():
      print 'Installing Gems'
      run('echo $PWD')
      #run('export GEM_HOME=$PWD &amp;&amp; GEM_PATH=$PWD &amp;&amp; gem install sass')
  
  @task('gems')
  def setup():
      pass
  </code></pre>
  
  <p>My automation script:</p>
  
  <pre><code>import invoke
  import invoke.cli
  
  invoke.cli.parse(['-r', os.path.dirname(__file__), '--list'])
  </code></pre>
  
  <p>this returns </p>
  
  <pre><code>Available tasks:
  
    gems
    setup
  </code></pre>
  
  <p>But when try to execute 'gems' as below:</p>
  
  <pre><code>invoke.cli.parse(['-r', os.path.dirname(__file__), 'gems'])
  </code></pre>
  
  <p>It is not executing the task</p>