File: test_utils.py

package info (click to toggle)
pytest-doctestplus 1.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 352 kB
  • sloc: python: 1,978; makefile: 13; sh: 7
file content (13 lines) | stat: -rw-r--r-- 340 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
from pytest_doctestplus.utils import ModuleChecker


class TestModuleChecker:
    def test_simple(self):
        c = ModuleChecker()
        assert c.check('sys')
        assert not c.check('foobar')

    def test_with_version(self):
        c = ModuleChecker()
        assert c.check('pytest>1.0')
        assert not c.check('foobar>1.0')