nvim-neotest / neotest-python

MIT License
116 stars 34 forks source link

Can no longer pass `args` to pytest runner #61

Closed nguyenanhhao221 closed 6 months ago

nguyenanhhao221 commented 6 months ago

Summary

Config

  -- For Python test
  {
    "nvim-neotest/neotest",
    dependencies = {
      "nvim-neotest/neotest-python",
    },
    lazy = true,
    opts = function(_, opts)
      table.insert(
        opts.adapters,
        require("neotest-python")({
          -- Extra arguments for nvim-dap configuration
          -- See https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings for values
          dap = {
            justMyCode = false,
            console = "integratedTerminal",
          },
          args = { "--log-level", "DEBUG", "-s" },
          runner = "pytest",
        })
      )
    end,
  },

Error output

usage: neotest.py [-h] --runner RUNNER --results-file RESULTS_FILE --stream-file STREAM_FILE
                  [--emit-parameterized-ids]
                  [args ...]
neotest.py: error: unrecognized arguments: --log-level -s /Users/haonguyen/Code/rapiddweller/rd-lib-datamimic/tests/integration_tests/datamimic_demo/test_datamimic_demo.py::TestDatamim
icDemo::test_g_domains
Willem-J-an commented 6 months ago

Same, rolling back one commit fixes it


~/.local/share/nvim/lazy/neotest-python$ git checkout 48bf141
Previous HEAD position was 27a2676 fix(pytest): handle parameterized tests without pytest discovery
HEAD is now at 48bf141 feat: django support. (#54)