File: test__readme_doctest.py

package info (click to toggle)
python-sentinels 1.1.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 124 kB
  • sloc: python: 45; sh: 7; makefile: 3
file content (13 lines) | stat: -rw-r--r-- 425 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
from unittest import TestCase
import os
import doctest


class ReadMeDocTest(TestCase):
    def test__readme_doctests(self):
        readme_path = os.path.abspath(
            os.path.join(os.path.dirname(__file__), "..", "README.md")
        )
        assert os.path.exists(readme_path)
        result = doctest.testfile(readme_path, module_relative=False)
        assert result.failed == 0, "{result.failed} tests failed!"