Before my testing library of choice was unittest. It was working with my favourite debugger - Pudb. Not Pdb!!! 
To use Pudb with unittest, I paste import pudb;pudb.set_trace() between the lines of code.
I then executed python -m unittest my_file_test, where my_file_test is module representation of my_file_test.py file.
Simply using nosetests my_file_test.py won't work - AttributeError: StringIO instance has no attribute 'fileno' will be thrown.
With py.test neither works:
py.test my_file_test.py
nor
python -m pytest my_file_test.py 
both throw ValueError: redirected Stdin is pseudofile, has no fileno()
Any ideas about how to use Pudb with py.test
Simply by adding the -s flag pytest will not replace stdin and stdout and debugging will be accessible, i.e. pytest -s my_file_test.py will do the trick.
In documentation provided by ambi it is also said that previously using explicitly -s was required for regular pdb too, now -s flag is implicitly used with --pdb flag.
However pytest does not implicitly support pUdb, so setting -s is needed.
Using Python pudb debugger with pytest