Fix Python – How to execute ipdb.set_trace() at will while running pytest tests

I’m using pytest for my test suite. While catching bugs in complex inter-components test, I would like to place import ipdb; ipdb.set_trace() in the middle of my code to allow me to debug it.
However, since pytest traps sys.stdin/sys.stdout ipdb fails. How can I use ipdb while testing with pytest.
I’m not interested in jumping to pdb or ipdb after….

Fix Python – How to test single file under pytest

How do you test a single file in pytest? I could only find ignore options and no “test this file only” option in the docs.
Preferably this would work on the command line instead of setup.cfg, as I would like to run different file tests in the ide. The entire suite takes too long.

Fix Python – How to suppress py.test internal deprecation warnings

Is there a way to suppress the pytest’s internal deprecation warnings?
Context: I’m looking to evaluate the difficulty of porting a test suite from nose to pytest. The suite is fairly large and heavily uses nose-style yield based test generators.
I’d like to first make sure the existing tests pass with pytest, and then maybe change test generators….

Fix Python – How do I disable a test using pytest?

Let’s say I have a bunch of tests:
def test_func_one():

def test_func_two():

def test_func_three():

Is there a decorator or something similar that I could add to the functions to prevent pytest from running just that test? The result might look something like…
def test_func_one():

def test_fu….

Fix Python – How do I configure PyCharm to run py.test tests?

I want to start writing unit tests for my Python code, and the py.test framework sounds like a better bet than Python’s bundled unittest. So I added a “tests” directory to my project, and added to it. Now I want to configure PyCharm to run all the tests in my “tests” directory.
PyCharm allegedly supports py.test in its test runner. ….