test_doctest.txt 300 B

1234567891011121314151617
  1. This is a sample doctest in a text file.
  2. In this example, we'll rely on a global variable being set for us
  3. already:
  4. >>> favorite_color
  5. 'blue'
  6. We can make this fail by disabling the blank-line feature.
  7. >>> if 1:
  8. ... print('a')
  9. ... print()
  10. ... print('b')
  11. a
  12. <BLANKLINE>
  13. b