Part of my test is to print some statements in command line.
I followed steps which mentioned here: How can I see print() statements in behave (BDD)
However, Iām not able to see the print() statement from last line of my code.
I ran test_bdd.feature --no-capture on command line and the result:
Feature: Learning BDD # test_bdd.feature:1
  Scenario: Cooking test       # test_bdd.feature:3
    Given I am hungry          # steps/test_bdd.py:3 0.000s
    When my mother is shopping # steps/test_bdd.py:7 0.000s
    Then I cook a meal         # steps/test_bdd.py:11
print debug #1
print debug #2
    Then I cook a meal         # steps/test_bdd.py:11 0.000s
1 feature passed, 0 failed, 0 skipped
1 scenario passed, 0 failed, 0 skipped
3 steps passed, 0 failed, 0 skipped, 0 undefined
Took 0m0.001s
^ No print debug #3 showed up in the result. Is there a way to show this part on command line?
My test_bdd.feature :
Feature: Learning BDD
  Scenario: Cooking test
    Given I am hungry
    When my mother is shopping
    Then I cook a meal
My test_bdd.py :
from behave import *
from selenium import webdriver
@given("I am hungry")
def step_impl(context):
    pass
@when("my mother is shopping")
def step_impl(context):
    pass
@then("I cook a meal")
def step_impl(context):
    print ("print debug #1")
    print ("print debug #2")
    print ("print debug #3")  # this line is not printed
I used python-behave version: behave 1.2.5