Describe the bug
Most code that uses TestClient gets a response from the server as r = client.get(...) [or similar for post requests. However, if we use pytests --pdb flag to drop into the terminal, it is impossible to read this value as r is one of the many single letter PDB commands.
It can be reassigned, but by this time you have accidentally returned as this is what r means in PDB
This is an easy fix, and will improve variable naming and test readability at the same time.
To Reproduce
Make a TestClient unit test fail with the --pdb flag. Try to read r by typing r. You will be returned out of PDB
Expected behaviour
The response should print.
System:
- OS: Kubuntu 24.04
- Python version: 3.11
- Version: 0.0.12
Additional context
Add any other context about the problem here.
Describe the bug
Most code that uses
TestClientgets a response from the server asr = client.get(...)[or similar for post requests. However, if we use pytests--pdbflag to drop into the terminal, it is impossible to read this value asris one of the many single letter PDB commands.It can be reassigned, but by this time you have accidentally returned as this is what r means in PDB
This is an easy fix, and will improve variable naming and test readability at the same time.
To Reproduce
Make a TestClient unit test fail with the
--pdbflag. Try to readrby typingr. You will be returned out of PDBExpected behaviour
The response should print.
System:
Additional context
Add any other context about the problem here.