   serialize: ->
     atomPythonTestViewState: @atomPythonTestView.serialize()
 
-  executePyTest: (args) ->
+  executePyTest: (filePath) ->
     {BufferedProcess} = require 'atom'
 
     @atomPythonTestView.clear()
     @atomPythonTestView.toggle()
 
-    command = atom.config.get('atom-python-test.pytestPath')
     stdout = (output) ->
       atomPythonTestView = AtomPythonTest.atomPythonTestView
       atomPythonTestView.addLine(output)

  atomPythonTestView: null
  modalPanel: null
  subscriptions: null

  config:
    pytestPath:
      type: 'string'
      default: 'python -m pytest'
      title: 'Path to py.test'
      description: '''
      Optional. Set it if default values are not working for you or you want to use specific
      py.test version. For example: '/usr/local/bin/py.test'
      '''

  activate: (state) ->



    if testName
      filePath = filePath + '::' + testName
      @executePyTest(filePath)

  runAllTests: ->
    editor = atom.workspace.getActivePaneItem()
    file = editor?.buffer.file
    filePath = file?.path
    @executePyTest(filePath)
