Beispiel #1
0
def test_sphinx_doc_plugin__process_tests__several_tests(
        extractTestInfo, testToDict):
    """
    Test :py:meth:`.SphinxDocPlugin.processTests` with several test.
    """
    plugin = SphinxDocPlugin()
    test_list = [1, 2, 3]
    expected_result = {}
    result = plugin.processTests(test_list)
    assert_equal(result, expected_result)
    assert_equal(extractTestInfo.call_count, len(test_list))
    assert_equal(testToDict.call_count, len(test_list))
Beispiel #2
0
def test_sphinx_doc_plugin__process_tests__several_tests(extractTestInfo,
                                                        testToDict):
    """
    Test :py:meth:`.SphinxDocPlugin.processTests` with several test.
    """
    plugin = SphinxDocPlugin()
    test_list = [1, 2, 3]
    expected_result = {}
    result = plugin.processTests(test_list)
    assert_equal(result, expected_result)
    assert_equal(extractTestInfo.call_count, len(test_list))
    assert_equal(testToDict.call_count, len(test_list))
Beispiel #3
0
def test_sphinx_doc_plugin__process_tests__empty_list(extractTestInfo,
                                                      testToDict):
    """
    Test :py:meth:`.SphinxDocPlugin.processTests` with empty list.
    """
    plugin = SphinxDocPlugin()
    test_list = []
    expected_result = {}
    result = plugin.processTests(test_list)
    assert_equal(result, expected_result)
    assert_equal(extractTestInfo.call_count, 0)
    assert_equal(testToDict.call_count, 0)
Beispiel #4
0
def test_sphinx_doc_plugin__process_tests__empty_list(extractTestInfo,
                                                        testToDict):
    """
    Test :py:meth:`.SphinxDocPlugin.processTests` with empty list.
    """
    plugin = SphinxDocPlugin()
    test_list = []
    expected_result = {}
    result = plugin.processTests(test_list)
    assert_equal(result, expected_result)
    assert_equal(extractTestInfo.call_count, 0)
    assert_equal(testToDict.call_count, 0)