     exit = (code) ->
       atomPythonTestView = AtomPythonTest.atomPythonTestView
 
+    command = 'python'
+    args = ['-m', 'pytest', filePath, '-s']
     process = new BufferedProcess({command, args, stdout, exit})
+
 
   runTestUnderCursor: ->
     editor = atom.workspace.getActiveTextEditor()


    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)

  serialize: ->
    atomPythonTestViewState: @atomPythonTestView.serialize()

  executePyTest: (filePath) ->
    {BufferedProcess} = require 'atom'

    @atomPythonTestView.clear()
    @atomPythonTestView.toggle()

    stdout = (output) ->
      atomPythonTestView = AtomPythonTest.atomPythonTestView
      atomPythonTestView.addLine(output)
