예제 #1
0
def test_sphinx_doc_plugin__store_test__single_call():
    """
    Test single call of :py:meth:`.SphinxDocPlugin.storeTest`.
    """
    #test single call
    plugin = SphinxDocPlugin()
    test = nose.case.Test(lambda x: x)
    assert_equal(plugin.tests, [])
    plugin.storeTest(test)
    assert_equal(plugin.tests, [test])
예제 #2
0
def test_sphinx_doc_plugin__store_test__single_call():
    """
    Test single call of :py:meth:`.SphinxDocPlugin.storeTest`.
    """
    #test single call
    plugin = SphinxDocPlugin()
    test = nose.case.Test(lambda x: x)
    assert_equal(plugin.tests, [])
    plugin.storeTest(test)
    assert_equal(plugin.tests, [test])
예제 #3
0
def test_sphinx_doc_plugin__store_test__several_calls():
    """
    Test several calls to :py:meth:`.SphinxDocPlugin.storeTest`.
    """
    #test double call
    plugin = SphinxDocPlugin()
    assert_equal(plugin.tests, [])
    test1 = nose.case.Test(lambda x: x)
    test2 = nose.case.Test(lambda x: x)
    plugin.storeTest(test1)
    plugin.storeTest(test2)
    assert_equal(plugin.tests, [test1, test2])
예제 #4
0
def test_sphinx_doc_plugin__store_test__several_calls():
    """
    Test several calls to :py:meth:`.SphinxDocPlugin.storeTest`.
    """
    #test double call
    plugin = SphinxDocPlugin()
    assert_equal(plugin.tests, [])
    test1 = nose.case.Test(lambda x: x)
    test2 = nose.case.Test(lambda x: x)
    plugin.storeTest(test1)
    plugin.storeTest(test2)
    assert_equal(plugin.tests, [test1, test2])