5

I try to debug my pytest-cases like this:

import pytest

def test_something()
    ...
    ...
    pytest.set_trace()

Then, i execute the tests by running elpy-test. The test starts to run and stops at pytest.set_trace() - unfortunately the compilation buffer is non-interactive and I'm stuck with a debugger that I can't use...

What's the right way to run tests in the debugger, using emacs?

1 Answer 1

5

I think that there are only the following solutions:

  • Run tests outside of Emacs from your terminal emulator
  • Run tests from realgud
  • Run tests inside Emacs via eshell. But shell output may be corrupted, so this not a good solution
  • Run tests with pytest-el. It works good, but without autocompletion.
3
  • I've installed and tried realgut. It's nice, but I don't understand how I can use it to solve my problem :s
    – Markus
    Commented Jun 29, 2017 at 11:50
  • Run your tests with realgud :) For example you can run tests from Emacs shell and attach it to realgud session.
    – sivakov512
    Commented Jun 29, 2017 at 11:53
  • I added information about pytest-el to my answer.
    – sivakov512
    Commented Sep 6, 2017 at 6:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.