Context: I am using Python with Behave (BDD).
Whether I run my tests from the command line (behave) or from a custom main(), the behavior is the same: the test runs
I figured it out after spending more time reading the documentation. It is actually quite simple. By default, behave does not display any output (i.e. by using print()) unless there is a failure in the test.
To force displaying all output regardless of the outcome of the test (pass/fail), all you need is to change some of the default settings. The easiest way to achieve that is to create a file named behave.ini in the root of your project's directory and put the following:
Filename: behave.ini
[behave]
stderr_capture=False
stdout_capture=False
Next time you run your behave tests, you will see all outputs from your debug statements whether your tests pass or fail.