Pytest Print or Dump Variables to Console for Debugging
Trying to print(var) in your pytest tests and wondering why you cannot see the output in your terminal’s standard output? This is because by default pytest captures all output sent to stdout and stderr, i.e., it intercepts the data going into the low-level file descriptors 1 and 2. This is a good idea because pytest […]