コード例 #1
0
ファイル: test_doctest.py プロジェクト: TheDunn/flex-pypy
def test_simple_docteststring_failing():
    testitem = DoctestText(name="dummy2", parent=None)
    testitem._setcontent("""
    >>> i = 0
    >>> i + 1
    2
    """)
    py.test.raises(Failed, "testitem.run()")
コード例 #2
0
ファイル: test_doctest.py プロジェクト: TheDunn/flex-pypy
def test_simple_docteststring():
    testitem = DoctestText(name="dummy", parent=None)
    testitem._setcontent("""
    >>> i = 0
    >>> i + 1
    1
    """)
    res = testitem.run()
    assert res is None