   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)


    if testName
      filePath = filePath + '::' + testName
      args = [filePath, '-s']
      @executePyTest(args)

  runAllTests: ->
    editor = atom.workspace.getActivePaneItem()
    file = editor?.buffer.file
    filePath = file?.path
    args = ['-s', filePath]
    @executePyTest(args)

  atomPythonTestView: null
  modalPanel: null
  subscriptions: null

  activate: (state) ->

