The version used is 350640d
Neither
with tqdm(...) as pb:
pb.write("test")
nor
with tqdm(...) as pb:
print("test")
work.
It turned out that the text output is buffered somehow, and flushed only if there are lot of lines. It is not flushed even on cell execution finish.