behave skipping print statements ?

Have you come across a situation where you execute a behave test containing step_definitions with print statements?
 > Have you wondered why the content in these print statements doesn't show up?
  > No, then you might already have done your research and have a solution
  > Yes, there a beautiful explanation to this.

" By default, behave outputs its report in color. This is problematic because the way it works is that when it runs a step, it first prints out the line of the step in a neutral color that indicates it does not yet know whether the step has passed or not. Once the step has finished, it uses escape codes to overwrite the previous line with a new color. If you don't do something to work around it, behave may simply overwrite what your print statement produced, and it may be difficult to figure out what happened "

For more go to best support in tech world

Comments

Popular Posts