File: stdout_test.py

package info (click to toggle)
python-testbook 0.4.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 408 kB
  • sloc: python: 1,045; makefile: 11
file content (7 lines) | stat: -rw-r--r-- 222 bytes parent folder | download
1
2
3
4
5
6
7
from testbook import testbook

@testbook('stdout-assertion-example.ipynb', execute=True)
def test_stdout(tb):
    assert tb.cell_output_text(1) == 'hello world!'

    assert 'The current time is' in tb.cell_output_text(2)