All Tests
The tests package contains all of the test classes / functions.
Exhale Core Tests
configs
Tests for validating error handling with configs set in conf.py.
- testing.tests.configs.assert_message_not_present(test, message, text, flags=0)[source]
Assert that
messageis found intext.This method is useful for creating consistent error messages when a test fails, including printing out what the contents of
messageandtextwere.Parameters
test(ExhaleTestCase)The test case to call
assertTruewith, should just beselffor most test cases in the framework.message(str)The message to search for in
text. This will be thepatternparameter for a call tore.search().text(str)The text to be searched. This will be the
stringparameter for a call tore.search().flags(int)Optional flags to supply as
flagstore.search(). Default of0means no special flags sent.
- testing.tests.configs.assert_message_present(test, message, text, flags=0)[source]
Assert that
messageis not found intext.This method is useful for creating consistent error messages when a test fails, including printing out what the contents of
messageandtextwere.Parameters
test(ExhaleTestCase)The test case to call
assertTruewith, should just beselffor most test cases in the framework.message(str)The message to search for in
text. This will be thepatternparameter for a call tore.search().text(str)The text to be searched. This will be the
stringparameter for a call tore.search().flags(int)Optional flags to supply as
flagstore.search(). Default of0means no special flags sent.
- class testing.tests.configs.ConfigurationStatusTests(methodName='runTest')[source]
Tests to ensure expected status messages are displayed.
- test_project = 'cpp_nesting'
Test Project Source
The
cpp_nestingtest project. - Additional documentation:testing.projects.cpp_nesting. - Source code for cpp_nesting available here. See also:ExhaleTestCase.test_project.Note
The
cpp_nestingproject is just being recycled, the tests for that project take place inCPPNesting.
- treeview_add_start_message = 'Exhale: adding tree view css / javascript\\.'
Start message displayed only when
createTreeViewisTrue.
- treeview_add_close_message = 'Exhale: added tree view css / javascript\\.'
Closing message displayed only when
createTreeViewisTrue.
- test_no_treeview()[source]
Verify no notification for adding CSS / JavaScript issued when no Tree View requested.
- test_treeview()[source]
Verify notification for adding CSS / JavaScript issued when Tree View requested.
- test_project_module = <module 'testing.projects.cpp_nesting' from '/home/docs/checkouts/readthedocs.org/user_builds/exhale/checkouts/stable/testing/projects/cpp_nesting/__init__.py'>
- class testing.tests.configs.ConfigurationWarningTests(methodName='runTest')[source]
Tests to ensure non-fatal configuration discrepancies receive warnings.
- test_project = 'cpp_nesting'
Test Project Source
The
cpp_nestingtest project. - Additional documentation:testing.projects.cpp_nesting. - Source code for cpp_nesting available here. See also:ExhaleTestCase.test_project.Note
The
cpp_nestingproject is just being recycled, the tests for that project take place inCPPNesting.
- test_treeview_mismatch()[source]
Verify warning issued with
createTreeView=FalsebuttreeViewIsBootstrap=True.
- test_project_module = <module 'testing.projects.cpp_nesting' from '/home/docs/checkouts/readthedocs.org/user_builds/exhale/checkouts/stable/testing/projects/cpp_nesting/__init__.py'>
- class testing.tests.configs.ListingExcludeTests(methodName='runTest')[source]
Test for expected failures when invalid configurations are given in
conf.py.- test_project = 'cpp_nesting'
Test Project Source
The
cpp_nestingtest project. - Additional documentation:testing.projects.cpp_nesting. - Source code for cpp_nesting available here. See also:ExhaleTestCase.test_project.Note
The
cpp_nestingproject is just being recycled, the tests for that project take place inCPPNesting.
- class BadStr[source]
Helper for
ListingExcludeTests.test_invalid_report_index().
- test_invalid_report_index()[source]
Verify list index is indicated when item cannot be converted to string.
- test_too_many()[source]
Verify that length three item is rejected.
Only
pattern:stror(pattern:str, flags:int)are allowed.
- test_project_module = <module 'testing.projects.cpp_nesting' from '/home/docs/checkouts/readthedocs.org/user_builds/exhale/checkouts/stable/testing/projects/cpp_nesting/__init__.py'>
- class testing.tests.configs.UnabridgedOrphanKindsTests(methodName='runTest')[source]
Test various values of
unabridgedOrphanKinds.- test_project = 'cpp_long_names'
Test Project Source
The
cpp_long_namestest project. - Additional documentation:testing.projects.cpp_long_names. - Source code for cpp_long_names available here. See also:ExhaleTestCase.test_project.The
cpp_long_namesproject essentially has 1 compound of each kind, which makes it an ideal project to reuse here.
- test_project_module = <module 'testing.projects.cpp_long_names' from '/home/docs/checkouts/readthedocs.org/user_builds/exhale/checkouts/stable/testing/projects/cpp_long_names/__init__.py'>
- class testing.tests.configs.ManualIndexingTests(methodName='runTest')[source]
Tests for Manual Indexing.
Includes checks for:
- test_project = 'cpp_nesting'
Test Project Source
The
cpp_nestingtest project. - Additional documentation:testing.projects.cpp_nesting. - Source code for cpp_nesting available here. See also:ExhaleTestCase.test_project.
- verify_expected_files(*, page_default: str = 'page_view_hierarchy.rst.include', class_default: str = 'class_view_hierarchy.rst.include', file_default: str = 'file_view_hierarchy.rst.include', u_api_default: str = 'unabridged_api.rst.include', u_orphan_default: str = 'unabridged_orphan.rst')[source]
Verify the expected files were generated and included.
- test_invalid_root_filename()[source]
Test that non-‘.rst’ suffix file is rejected, the root document is rst only.
- test_project_module = <module 'testing.projects.cpp_nesting' from '/home/docs/checkouts/readthedocs.org/user_builds/exhale/checkouts/stable/testing/projects/cpp_nesting/__init__.py'>
- test_class_hierarchy_filename()[source]
Test changing
classHierarchyFilenameworks.
- test_file_hierarchy_filename()[source]
Test changing
fileHierarchyFilenameworks.
- test_page_hierarchy_filename()[source]
Test changing
pageHierarchyFilenameworks.
- test_unabridged_api_filename()[source]
Test changing
unabridgedApiFilenameworks.
- test_unabridged_orphan_filename()[source]
Test changing
unabridgedOrphanFilenameworks.
configs_tree_view_data
Helper module for configs_tree_view.
Defines class_hierarchy_ground_truth and file_hierarchy_ground_truth
here for convenience, and to hide away the dubious nature by which these tests are
validated.
- testing.tests.configs_tree_view_data.this_file_dir = PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/exhale/checkouts/stable/testing/tests/configs_tree_view_data')
The path to the directory containing this file.
- testing.tests.configs_tree_view_data.class_data_root = PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/exhale/checkouts/stable/testing/tests/configs_tree_view_data/classes')
The class view hierarchy test validation data root for tree view.
- testing.tests.configs_tree_view_data.file_data_root = PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/exhale/checkouts/stable/testing/tests/configs_tree_view_data/files')
The file view hierarchy test validation root for tree view.
- testing.tests.configs_tree_view_data.tree_view_keys = {'bootstrap', 'collapsible_lists', 'default_rst_list'}
Available kinds of tree views to validate against.
- testing.tests.configs_tree_view_data.read_default_data(root: Path, file_name: str, is_html: bool) str[source]
Open, read, and return the contents of the file
{root}/{file_name}.If the default data being read is html (collapsible lists and bootstrap), underscores in the refid need to be replaced with dashes since the link generated follows an html anchor (
#).The stored data files include the unix doxygen refids, on windows they are replaced with the expected refid. Doxygen only seems to differ on the platforms when there is nesting / specialization occurring. The tree view tests are validating against the
cpp_nestingproject which has a large amount of this going on.
- testing.tests.configs_tree_view_data.class_hierarchy_ground_truth = {'bootstrap': '<div id="class-treeView"></div>\n<script type="text/javascript">\n function getClassHierarchyTree() {\n return [\n {\n text: "<span class=\\"text-muted\\">Namespace</span> nested",\n href: "namespace_nested.html#namespace-nested",\n selectable: false,\n tags: [\'4\'],\n nodes: [\n {\n text: "<span class=\\"text-muted\\">Namespace</span> nested::dual_nested",\n href: "namespace_nested__dual_nested.html#namespace-nested-dual-nested",\n selectable: false,\n tags: [\'2\'],\n nodes: [\n {\n text: "<span class=\\"text-muted\\">Struct</span> one",\n href: "structnested_1_1dual__nested_1_1one.html#exhale-struct-structnested-1-1dual-nested-1-1one",\n selectable: false,\n tags: [\'1\'],\n nodes: [\n {\n text: "<span class=\\"text-muted\\">Struct</span> one::params",\n href: "structnested_1_1dual__nested_1_1one_1_1params.html#exhale-struct-structnested-1-1dual-nested-1-1one-1-1params",\n selectable: false,\n tags: [\'1\'],\n nodes: [\n {\n text: "<span class=\\"text-muted\\">Union</span> params::four_bytes",\n href: "unionnested_1_1dual__nested_1_1one_1_1params_1_1four__bytes.html#exhale-union-unionnested-1-1dual-nested-1-1one-1-1params-1-1four-bytes",\n selectable: false,\n },\n ]\n },\n ]\n },\n {\n text: "<span class=\\"text-muted\\">Struct</span> two",\n href: "structnested_1_1dual__nested_1_1two.html#exhale-struct-structnested-1-1dual-nested-1-1two",\n selectable: false,\n tags: [\'1\'],\n nodes: [\n {\n text: "<span class=\\"text-muted\\">Struct</span> two::params",\n href: "structnested_1_1dual__nested_1_1two_1_1params.html#exhale-struct-structnested-1-1dual-nested-1-1two-1-1params",\n selectable: false,\n tags: [\'1\'],\n nodes: [\n {\n text: "<span class=\\"text-muted\\">Union</span> params::four_bytes",\n href: "unionnested_1_1dual__nested_1_1two_1_1params_1_1four__bytes.html#exhale-union-unionnested-1-1dual-nested-1-1two-1-1params-1-1four-bytes",\n selectable: false,\n },\n ]\n },\n ]\n },\n ]\n },\n {\n text: "<span class=\\"text-muted\\">Struct</span> one",\n href: "structnested_1_1one.html#exhale-struct-structnested-1-1one",\n selectable: false,\n tags: [\'1\'],\n nodes: [\n {\n text: "<span class=\\"text-muted\\">Struct</span> one::params",\n href: "structnested_1_1one_1_1params.html#exhale-struct-structnested-1-1one-1-1params",\n selectable: false,\n tags: [\'1\'],\n nodes: [\n {\n text: "<span class=\\"text-muted\\">Union</span> params::four_bytes",\n href: "unionnested_1_1one_1_1params_1_1four__bytes.html#exhale-union-unionnested-1-1one-1-1params-1-1four-bytes",\n selectable: false,\n },\n ]\n },\n ]\n },\n {\n text: "<span class=\\"text-muted\\">Struct</span> two",\n href: "structnested_1_1two.html#exhale-struct-structnested-1-1two",\n selectable: false,\n tags: [\'1\'],\n nodes: [\n {\n text: "<span class=\\"text-muted\\">Struct</span> two::params",\n href: "structnested_1_1two_1_1params.html#exhale-struct-structnested-1-1two-1-1params",\n selectable: false,\n tags: [\'1\'],\n nodes: [\n {\n text: "<span class=\\"text-muted\\">Union</span> params::four_bytes",\n href: "unionnested_1_1two_1_1params_1_1four__bytes.html#exhale-union-unionnested-1-1two-1-1params-1-1four-bytes",\n selectable: false,\n },\n ]\n },\n ]\n },\n {\n text: "<span class=\\"text-muted\\">Union</span> four_bytes",\n href: "unionnested_1_1four__bytes.html#exhale-union-unionnested-1-1four-bytes",\n selectable: false,\n },\n ]\n },\n {\n text: "<span class=\\"text-muted\\">Namespace</span> special",\n href: "namespace_special.html#namespace-special",\n selectable: false,\n tags: [\'9\'],\n nodes: [\n {\n text: "<span class=\\"text-muted\\">Namespace</span> special::complex",\n href: "namespace_special__complex.html#namespace-special-complex",\n selectable: false,\n tags: [\'5\'],\n nodes: [\n {\n text: "<span class=\\"text-muted\\">Template Struct</span> Fold",\n href: "structspecial_1_1complex_1_1Fold.html#exhale-struct-structspecial-1-1complex-1-1Fold",\n selectable: false,\n },\n {\n text: "<span class=\\"text-muted\\">Template Struct</span> has_type_member",\n href: "structspecial_1_1complex_1_1has__type__member.html#exhale-struct-structspecial-1-1complex-1-1has-type-member",\n selectable: false,\n },\n {\n text: "<span class=\\"text-muted\\">Template Struct</span> has_type_member< T, void_t< typename T::type > >",\n href: "structspecial_1_1complex_1_1has__type__member_3_01T_00_01void__t_3_01typename_01T_1_1type_01_4_01_4.html#exhale-struct-structspecial-1-1complex-1-1has-type-member-3-01T-00-01void-t-3-01typename-01T-1-1type-01-4-01-4",\n selectable: false,\n },\n {\n text: "<span class=\\"text-muted\\">Template Struct</span> IntPtr",\n href: "structspecial_1_1complex_1_1IntPtr.html#exhale-struct-structspecial-1-1complex-1-1IntPtr",\n selectable: false,\n },\n {\n text: "<span class=\\"text-muted\\">Template Struct</span> IntRef",\n href: "structspecial_1_1complex_1_1IntRef.html#exhale-struct-structspecial-1-1complex-1-1IntRef",\n selectable: false,\n },\n ]\n },\n {\n text: "<span class=\\"text-muted\\">Namespace</span> special::unique",\n href: "namespace_special__unique.html#namespace-special-unique",\n selectable: false,\n tags: [\'4\'],\n nodes: [\n {\n text: "<span class=\\"text-muted\\">Namespace</span> special::unique::snowflake",\n href: "namespace_special__unique__snowflake.html#namespace-special-unique-snowflake",\n selectable: false,\n tags: [\'2\'],\n nodes: [\n {\n text: "<span class=\\"text-muted\\">Template Struct</span> Ontology",\n href: "structspecial_1_1unique_1_1snowflake_1_1Ontology.html#exhale-struct-structspecial-1-1unique-1-1snowflake-1-1Ontology",\n selectable: false,\n },\n {\n text: "<span class=\\"text-muted\\">Template</span> Struct Ontology< 11 >",\n href: "structspecial_1_1unique_1_1snowflake_1_1Ontology_3_0111_01_4.html#exhale-struct-structspecial-1-1unique-1-1snowflake-1-1Ontology-3-0111-01-4",\n selectable: false,\n },\n ]\n },\n {\n text: "<span class=\\"text-muted\\">Template Struct</span> Nonsense",\n href: "structspecial_1_1unique_1_1Nonsense.html#exhale-struct-structspecial-1-1unique-1-1Nonsense",\n selectable: false,\n },\n {\n text: "<span class=\\"text-muted\\">Template</span> Struct Nonsense< 11, snowflake::Ontology< 11 > >",\n href: "structspecial_1_1unique_1_1Nonsense_3_0111_00_01snowflake_1_1Ontology_3_0111_01_4_01_4.html#exhale-struct-structspecial-1-1unique-1-1Nonsense-3-0111-00-01snowflake-1-1Ontology-3-0111-01-4-01-4",\n selectable: false,\n },\n {\n text: "<span class=\\"text-muted\\">Template Struct</span> Nonsense< X, snowflake::Ontology< X > >",\n href: "structspecial_1_1unique_1_1Nonsense_3_01X_00_01snowflake_1_1Ontology_3_01X_01_4_01_4.html#exhale-struct-structspecial-1-1unique-1-1Nonsense-3-01X-00-01snowflake-1-1Ontology-3-01X-01-4-01-4",\n selectable: false,\n },\n ]\n },\n {\n text: "<span class=\\"text-muted\\">Template Struct</span> Base",\n href: "structspecial_1_1Base.html#exhale-struct-structspecial-1-1Base",\n selectable: false,\n tags: [\'1\'],\n nodes: [\n {\n text: "<span class=\\"text-muted\\">Struct</span> Base::A",\n href: "structspecial_1_1Base_1_1A.html#exhale-struct-structspecial-1-1Base-1-1A",\n selectable: false,\n },\n ]\n },\n {\n text: "<span class=\\"text-muted\\">Template</span> Struct Base< 2 >",\n href: "structspecial_1_1Base_3_012_01_4.html#exhale-struct-structspecial-1-1Base-3-012-01-4",\n selectable: false,\n tags: [\'4\'],\n nodes: [\n {\n text: "<span class=\\"text-muted\\">Template</span> Struct Base< 2 >::AnotherNestedStruct",\n href: "structspecial_1_1Base_3_012_01_4_1_1AnotherNestedStruct.html#exhale-struct-structspecial-1-1Base-3-012-01-4-1-1AnotherNestedStruct",\n selectable: false,\n },\n {\n text: "<span class=\\"text-muted\\">Template</span> Struct Base< 2 >::InnerStruct",\n href: "structspecial_1_1Base_3_012_01_4_1_1InnerStruct.html#exhale-struct-structspecial-1-1Base-3-012-01-4-1-1InnerStruct",\n selectable: false,\n },\n {\n text: "<span class=\\"text-muted\\">Template</span> Struct Base< 2 >::InnerTemplatedStruct",\n href: "structspecial_1_1Base_3_012_01_4_1_1InnerTemplatedStruct.html#exhale-struct-structspecial-1-1Base-3-012-01-4-1-1InnerTemplatedStruct",\n selectable: false,\n },\n {\n text: "<span class=\\"text-muted\\">Template</span> Struct Base< 2 >::InnerTemplatedStruct< 4, dont_use_this >",\n href: "structspecial_1_1Base_3_012_01_4_1_1InnerTemplatedStruct_3_014_00_01dont__use__this_01_4.html#exhale-struct-structspecial-1-1Base-3-012-01-4-1-1InnerTemplatedStruct-3-014-00-01dont-use-this-01-4",\n selectable: false,\n },\n ]\n },\n {\n text: "<span class=\\"text-muted\\">Template Struct</span> Image",\n href: "structspecial_1_1Image.html#exhale-struct-structspecial-1-1Image",\n selectable: false,\n },\n {\n text: "<span class=\\"text-muted\\">Struct</span> Normal",\n href: "structspecial_1_1Normal.html#exhale-struct-structspecial-1-1Normal",\n selectable: false,\n tags: [\'1\'],\n nodes: [\n {\n text: "<span class=\\"text-muted\\">Struct</span> Normal::Nested",\n href: "structspecial_1_1Normal_1_1Nested.html#exhale-struct-structspecial-1-1Normal-1-1Nested",\n selectable: false,\n tags: [\'1\'],\n nodes: [\n {\n text: "<span class=\\"text-muted\\">Struct</span> Nested::Like",\n href: "structspecial_1_1Normal_1_1Nested_1_1Like.html#exhale-struct-structspecial-1-1Normal-1-1Nested-1-1Like",\n selectable: false,\n tags: [\'1\'],\n nodes: [\n {\n text: "<span class=\\"text-muted\\">Struct</span> Like::Usual",\n href: "structspecial_1_1Normal_1_1Nested_1_1Like_1_1Usual.html#exhale-struct-structspecial-1-1Normal-1-1Nested-1-1Like-1-1Usual",\n selectable: false,\n },\n ]\n },\n ]\n },\n ]\n },\n {\n text: "<span class=\\"text-muted\\">Template Class</span> ImageBuffer",\n href: "classspecial_1_1ImageBuffer.html#exhale-class-classspecial-1-1ImageBuffer",\n selectable: false,\n tags: [\'2\'],\n nodes: [\n {\n text: "<span class=\\"text-muted\\">Struct</span> ImageBuffer::Data",\n href: "structspecial_1_1ImageBuffer_1_1Data.html#exhale-struct-structspecial-1-1ImageBuffer-1-1Data",\n selectable: false,\n },\n {\n text: "<span class=\\"text-muted\\">Template Struct</span> ImageBuffer::SomeThing",\n href: "structspecial_1_1ImageBuffer_1_1SomeThing.html#exhale-struct-structspecial-1-1ImageBuffer-1-1SomeThing",\n selectable: false,\n },\n ]\n },\n {\n text: "<span class=\\"text-muted\\">Template</span> Class ImageBuffer< Image< 1920, 1080 >, float, 128 >",\n href: "classspecial_1_1ImageBuffer_3_01Image_3_011920_00_011080_01_4_00_01float_00_01128_01_4.html#exhale-class-classspecial-1-1ImageBuffer-3-01Image-3-011920-00-011080-01-4-00-01float-00-01128-01-4",\n selectable: false,\n tags: [\'2\'],\n nodes: [\n {\n text: "<span class=\\"text-muted\\">Template</span> Struct ImageBuffer< Image< 1920, 1080 >, float, 128 >::Data",\n href: "structspecial_1_1ImageBuffer_3_01Image_3_011920_00_011080_01_4_00_01float_00_01128_01_4_1_1Data.html#exhale-struct-structspecial-1-1ImageBuffer-3-01Image-3-011920-00-011080-01-4-00-01float-00-01128-01-4-1-1Data",\n selectable: false,\n },\n {\n text: "<span class=\\"text-muted\\">Template</span> Struct ImageBuffer< Image< 1920, 1080 >, float, 128 >::SomeThing",\n href: "structspecial_1_1ImageBuffer_3_01Image_3_011920_00_011080_01_4_00_01float_00_01128_01_4_1_1SomeThing.html#exhale-struct-structspecial-1-1ImageBuffer-3-01Image-3-011920-00-011080-01-4-00-01float-00-01128-01-4-1-1SomeThing",\n selectable: false,\n },\n ]\n },\n {\n text: "<span class=\\"text-muted\\">Template Class</span> ImageBuffer< TImage, Tdata_t, 4 >",\n href: "classspecial_1_1ImageBuffer_3_01TImage_00_01Tdata__t_00_014_01_4.html#exhale-class-classspecial-1-1ImageBuffer-3-01TImage-00-01Tdata-t-00-014-01-4",\n selectable: false,\n tags: [\'2\'],\n nodes: [\n {\n text: "<span class=\\"text-muted\\">Template</span> Struct ImageBuffer< TImage, Tdata_t, 4 >::Data",\n href: "structspecial_1_1ImageBuffer_3_01TImage_00_01Tdata__t_00_014_01_4_1_1Data.html#exhale-struct-structspecial-1-1ImageBuffer-3-01TImage-00-01Tdata-t-00-014-01-4-1-1Data",\n selectable: false,\n },\n {\n text: "<span class=\\"text-muted\\">Template</span> Struct ImageBuffer< TImage, Tdata_t, 4 >::SomeThing",\n href: "structspecial_1_1ImageBuffer_3_01TImage_00_01Tdata__t_00_014_01_4_1_1SomeThing.html#exhale-struct-structspecial-1-1ImageBuffer-3-01TImage-00-01Tdata-t-00-014-01-4-1-1SomeThing",\n selectable: false,\n },\n ]\n },\n ]\n },\n {\n text: "<span class=\\"text-muted\\">Struct</span> top_level",\n href: "structtop__level.html#exhale-struct-structtop-level",\n selectable: false,\n },\n ]\n }\n</script><!-- end getClassHierarchyTree() function -->\n', 'collapsible_lists': '<ul class="treeView" id="class-treeView">\n <li>\n <ul class="collapsibleList">\n <li>\n Namespace <a href="namespace_nested.html#namespace-nested">nested</a>\n <ul>\n <li>\n Namespace <a href="namespace_nested__dual_nested.html#namespace-nested-dual-nested">nested::dual_nested</a>\n <ul>\n <li>\n Struct <a href="structnested_1_1dual__nested_1_1one.html#exhale-struct-structnested-1-1dual-nested-1-1one">one</a>\n <ul>\n <li class="lastChild">\n Struct <a href="structnested_1_1dual__nested_1_1one_1_1params.html#exhale-struct-structnested-1-1dual-nested-1-1one-1-1params">one::params</a>\n <ul>\n <li class="lastChild">Union <a href="unionnested_1_1dual__nested_1_1one_1_1params_1_1four__bytes.html#exhale-union-unionnested-1-1dual-nested-1-1one-1-1params-1-1four-bytes">params::four_bytes</a></li>\n </ul>\n </li>\n </ul>\n </li>\n <li class="lastChild">\n Struct <a href="structnested_1_1dual__nested_1_1two.html#exhale-struct-structnested-1-1dual-nested-1-1two">two</a>\n <ul>\n <li class="lastChild">\n Struct <a href="structnested_1_1dual__nested_1_1two_1_1params.html#exhale-struct-structnested-1-1dual-nested-1-1two-1-1params">two::params</a>\n <ul>\n <li class="lastChild">Union <a href="unionnested_1_1dual__nested_1_1two_1_1params_1_1four__bytes.html#exhale-union-unionnested-1-1dual-nested-1-1two-1-1params-1-1four-bytes">params::four_bytes</a></li>\n </ul>\n </li>\n </ul>\n </li>\n </ul>\n </li>\n <li>\n Struct <a href="structnested_1_1one.html#exhale-struct-structnested-1-1one">one</a>\n <ul>\n <li class="lastChild">\n Struct <a href="structnested_1_1one_1_1params.html#exhale-struct-structnested-1-1one-1-1params">one::params</a>\n <ul>\n <li class="lastChild">Union <a href="unionnested_1_1one_1_1params_1_1four__bytes.html#exhale-union-unionnested-1-1one-1-1params-1-1four-bytes">params::four_bytes</a></li>\n </ul>\n </li>\n </ul>\n </li>\n <li>\n Struct <a href="structnested_1_1two.html#exhale-struct-structnested-1-1two">two</a>\n <ul>\n <li class="lastChild">\n Struct <a href="structnested_1_1two_1_1params.html#exhale-struct-structnested-1-1two-1-1params">two::params</a>\n <ul>\n <li class="lastChild">Union <a href="unionnested_1_1two_1_1params_1_1four__bytes.html#exhale-union-unionnested-1-1two-1-1params-1-1four-bytes">params::four_bytes</a></li>\n </ul>\n </li>\n </ul>\n </li>\n <li class="lastChild">Union <a href="unionnested_1_1four__bytes.html#exhale-union-unionnested-1-1four-bytes">four_bytes</a></li>\n </ul>\n </li>\n <li>\n Namespace <a href="namespace_special.html#namespace-special">special</a>\n <ul>\n <li>\n Namespace <a href="namespace_special__complex.html#namespace-special-complex">special::complex</a>\n <ul>\n <li>Template Struct <a href="structspecial_1_1complex_1_1Fold.html#exhale-struct-structspecial-1-1complex-1-1Fold">Fold</a></li>\n <li>Template Struct <a href="structspecial_1_1complex_1_1has__type__member.html#exhale-struct-structspecial-1-1complex-1-1has-type-member">has_type_member</a></li>\n <li>Template Struct <a href="structspecial_1_1complex_1_1has__type__member_3_01T_00_01void__t_3_01typename_01T_1_1type_01_4_01_4.html#exhale-struct-structspecial-1-1complex-1-1has-type-member-3-01T-00-01void-t-3-01typename-01T-1-1type-01-4-01-4">has_type_member< T, void_t< typename T::type > ></a></li>\n <li>Template Struct <a href="structspecial_1_1complex_1_1IntPtr.html#exhale-struct-structspecial-1-1complex-1-1IntPtr">IntPtr</a></li>\n <li class="lastChild">Template Struct <a href="structspecial_1_1complex_1_1IntRef.html#exhale-struct-structspecial-1-1complex-1-1IntRef">IntRef</a></li>\n </ul>\n </li>\n <li>\n Namespace <a href="namespace_special__unique.html#namespace-special-unique">special::unique</a>\n <ul>\n <li>\n Namespace <a href="namespace_special__unique__snowflake.html#namespace-special-unique-snowflake">special::unique::snowflake</a>\n <ul>\n <li>Template Struct <a href="structspecial_1_1unique_1_1snowflake_1_1Ontology.html#exhale-struct-structspecial-1-1unique-1-1snowflake-1-1Ontology">Ontology</a></li>\n <li class="lastChild">Template <a href="structspecial_1_1unique_1_1snowflake_1_1Ontology_3_0111_01_4.html#exhale-struct-structspecial-1-1unique-1-1snowflake-1-1Ontology-3-0111-01-4">Struct Ontology< 11 ></a></li>\n </ul>\n </li>\n <li>Template Struct <a href="structspecial_1_1unique_1_1Nonsense.html#exhale-struct-structspecial-1-1unique-1-1Nonsense">Nonsense</a></li>\n <li>Template <a href="structspecial_1_1unique_1_1Nonsense_3_0111_00_01snowflake_1_1Ontology_3_0111_01_4_01_4.html#exhale-struct-structspecial-1-1unique-1-1Nonsense-3-0111-00-01snowflake-1-1Ontology-3-0111-01-4-01-4">Struct Nonsense< 11, snowflake::Ontology< 11 > ></a></li>\n <li class="lastChild">Template Struct <a href="structspecial_1_1unique_1_1Nonsense_3_01X_00_01snowflake_1_1Ontology_3_01X_01_4_01_4.html#exhale-struct-structspecial-1-1unique-1-1Nonsense-3-01X-00-01snowflake-1-1Ontology-3-01X-01-4-01-4">Nonsense< X, snowflake::Ontology< X > ></a></li>\n </ul>\n </li>\n <li>\n Template Struct <a href="structspecial_1_1Base.html#exhale-struct-structspecial-1-1Base">Base</a>\n <ul>\n <li class="lastChild">Struct <a href="structspecial_1_1Base_1_1A.html#exhale-struct-structspecial-1-1Base-1-1A">Base::A</a></li>\n </ul>\n </li>\n <li>\n Template <a href="structspecial_1_1Base_3_012_01_4.html#exhale-struct-structspecial-1-1Base-3-012-01-4">Struct Base< 2 ></a>\n <ul>\n <li>Template <a href="structspecial_1_1Base_3_012_01_4_1_1AnotherNestedStruct.html#exhale-struct-structspecial-1-1Base-3-012-01-4-1-1AnotherNestedStruct">Struct Base< 2 >::AnotherNestedStruct</a></li>\n <li>Template <a href="structspecial_1_1Base_3_012_01_4_1_1InnerStruct.html#exhale-struct-structspecial-1-1Base-3-012-01-4-1-1InnerStruct">Struct Base< 2 >::InnerStruct</a></li>\n <li>Template <a href="structspecial_1_1Base_3_012_01_4_1_1InnerTemplatedStruct.html#exhale-struct-structspecial-1-1Base-3-012-01-4-1-1InnerTemplatedStruct">Struct Base< 2 >::InnerTemplatedStruct</a></li>\n <li class="lastChild">Template <a href="structspecial_1_1Base_3_012_01_4_1_1InnerTemplatedStruct_3_014_00_01dont__use__this_01_4.html#exhale-struct-structspecial-1-1Base-3-012-01-4-1-1InnerTemplatedStruct-3-014-00-01dont-use-this-01-4">Struct Base< 2 >::InnerTemplatedStruct< 4, dont_use_this ></a></li>\n </ul>\n </li>\n <li>Template Struct <a href="structspecial_1_1Image.html#exhale-struct-structspecial-1-1Image">Image</a></li>\n <li>\n Struct <a href="structspecial_1_1Normal.html#exhale-struct-structspecial-1-1Normal">Normal</a>\n <ul>\n <li class="lastChild">\n Struct <a href="structspecial_1_1Normal_1_1Nested.html#exhale-struct-structspecial-1-1Normal-1-1Nested">Normal::Nested</a>\n <ul>\n <li class="lastChild">\n Struct <a href="structspecial_1_1Normal_1_1Nested_1_1Like.html#exhale-struct-structspecial-1-1Normal-1-1Nested-1-1Like">Nested::Like</a>\n <ul>\n <li class="lastChild">Struct <a href="structspecial_1_1Normal_1_1Nested_1_1Like_1_1Usual.html#exhale-struct-structspecial-1-1Normal-1-1Nested-1-1Like-1-1Usual">Like::Usual</a></li>\n </ul>\n </li>\n </ul>\n </li>\n </ul>\n </li>\n <li>\n Template Class <a href="classspecial_1_1ImageBuffer.html#exhale-class-classspecial-1-1ImageBuffer">ImageBuffer</a>\n <ul>\n <li>Struct <a href="structspecial_1_1ImageBuffer_1_1Data.html#exhale-struct-structspecial-1-1ImageBuffer-1-1Data">ImageBuffer::Data</a></li>\n <li class="lastChild">Template Struct <a href="structspecial_1_1ImageBuffer_1_1SomeThing.html#exhale-struct-structspecial-1-1ImageBuffer-1-1SomeThing">ImageBuffer::SomeThing</a></li>\n </ul>\n </li>\n <li>\n Template <a href="classspecial_1_1ImageBuffer_3_01Image_3_011920_00_011080_01_4_00_01float_00_01128_01_4.html#exhale-class-classspecial-1-1ImageBuffer-3-01Image-3-011920-00-011080-01-4-00-01float-00-01128-01-4">Class ImageBuffer< Image< 1920, 1080 >, float, 128 ></a>\n <ul>\n <li>Template <a href="structspecial_1_1ImageBuffer_3_01Image_3_011920_00_011080_01_4_00_01float_00_01128_01_4_1_1Data.html#exhale-struct-structspecial-1-1ImageBuffer-3-01Image-3-011920-00-011080-01-4-00-01float-00-01128-01-4-1-1Data">Struct ImageBuffer< Image< 1920, 1080 >, float, 128 >::Data</a></li>\n <li class="lastChild">Template <a href="structspecial_1_1ImageBuffer_3_01Image_3_011920_00_011080_01_4_00_01float_00_01128_01_4_1_1SomeThing.html#exhale-struct-structspecial-1-1ImageBuffer-3-01Image-3-011920-00-011080-01-4-00-01float-00-01128-01-4-1-1SomeThing">Struct ImageBuffer< Image< 1920, 1080 >, float, 128 >::SomeThing</a></li>\n </ul>\n </li>\n <li class="lastChild">\n Template Class <a href="classspecial_1_1ImageBuffer_3_01TImage_00_01Tdata__t_00_014_01_4.html#exhale-class-classspecial-1-1ImageBuffer-3-01TImage-00-01Tdata-t-00-014-01-4">ImageBuffer< TImage, Tdata_t, 4 ></a>\n <ul>\n <li>Template <a href="structspecial_1_1ImageBuffer_3_01TImage_00_01Tdata__t_00_014_01_4_1_1Data.html#exhale-struct-structspecial-1-1ImageBuffer-3-01TImage-00-01Tdata-t-00-014-01-4-1-1Data">Struct ImageBuffer< TImage, Tdata_t, 4 >::Data</a></li>\n <li class="lastChild">Template <a href="structspecial_1_1ImageBuffer_3_01TImage_00_01Tdata__t_00_014_01_4_1_1SomeThing.html#exhale-struct-structspecial-1-1ImageBuffer-3-01TImage-00-01Tdata-t-00-014-01-4-1-1SomeThing">Struct ImageBuffer< TImage, Tdata_t, 4 >::SomeThing</a></li>\n </ul>\n </li>\n </ul>\n </li>\n <li class="lastChild">Struct <a href="structtop__level.html#exhale-struct-structtop-level">top_level</a></li>\n </ul>\n </li><!-- only tree view element -->\n</ul><!-- /treeView class-treeView -->\n', 'default_rst_list': '- :ref:`namespace_nested`\n - :ref:`namespace_nested__dual_nested`\n - :ref:`exhale_struct_structnested_1_1dual__nested_1_1one`\n - :ref:`exhale_struct_structnested_1_1dual__nested_1_1one_1_1params`\n - :ref:`exhale_union_unionnested_1_1dual__nested_1_1one_1_1params_1_1four__bytes`\n - :ref:`exhale_struct_structnested_1_1dual__nested_1_1two`\n - :ref:`exhale_struct_structnested_1_1dual__nested_1_1two_1_1params`\n - :ref:`exhale_union_unionnested_1_1dual__nested_1_1two_1_1params_1_1four__bytes`\n - :ref:`exhale_struct_structnested_1_1one`\n - :ref:`exhale_struct_structnested_1_1one_1_1params`\n - :ref:`exhale_union_unionnested_1_1one_1_1params_1_1four__bytes`\n - :ref:`exhale_struct_structnested_1_1two`\n - :ref:`exhale_struct_structnested_1_1two_1_1params`\n - :ref:`exhale_union_unionnested_1_1two_1_1params_1_1four__bytes`\n - :ref:`exhale_union_unionnested_1_1four__bytes`\n- :ref:`namespace_special`\n - :ref:`namespace_special__complex`\n - :ref:`exhale_struct_structspecial_1_1complex_1_1Fold`\n - :ref:`exhale_struct_structspecial_1_1complex_1_1has__type__member`\n - :ref:`exhale_struct_structspecial_1_1complex_1_1has__type__member_3_01T_00_01void__t_3_01typename_01T_1_1type_01_4_01_4`\n - :ref:`exhale_struct_structspecial_1_1complex_1_1IntPtr`\n - :ref:`exhale_struct_structspecial_1_1complex_1_1IntRef`\n - :ref:`namespace_special__unique`\n - :ref:`namespace_special__unique__snowflake`\n - :ref:`exhale_struct_structspecial_1_1unique_1_1snowflake_1_1Ontology`\n - :ref:`exhale_struct_structspecial_1_1unique_1_1snowflake_1_1Ontology_3_0111_01_4`\n - :ref:`exhale_struct_structspecial_1_1unique_1_1Nonsense`\n - :ref:`exhale_struct_structspecial_1_1unique_1_1Nonsense_3_0111_00_01snowflake_1_1Ontology_3_0111_01_4_01_4`\n - :ref:`exhale_struct_structspecial_1_1unique_1_1Nonsense_3_01X_00_01snowflake_1_1Ontology_3_01X_01_4_01_4`\n - :ref:`exhale_struct_structspecial_1_1Base`\n - :ref:`exhale_struct_structspecial_1_1Base_1_1A`\n - :ref:`exhale_struct_structspecial_1_1Base_3_012_01_4`\n - :ref:`exhale_struct_structspecial_1_1Base_3_012_01_4_1_1AnotherNestedStruct`\n - :ref:`exhale_struct_structspecial_1_1Base_3_012_01_4_1_1InnerStruct`\n - :ref:`exhale_struct_structspecial_1_1Base_3_012_01_4_1_1InnerTemplatedStruct`\n - :ref:`exhale_struct_structspecial_1_1Base_3_012_01_4_1_1InnerTemplatedStruct_3_014_00_01dont__use__this_01_4`\n - :ref:`exhale_struct_structspecial_1_1Image`\n - :ref:`exhale_struct_structspecial_1_1Normal`\n - :ref:`exhale_struct_structspecial_1_1Normal_1_1Nested`\n - :ref:`exhale_struct_structspecial_1_1Normal_1_1Nested_1_1Like`\n - :ref:`exhale_struct_structspecial_1_1Normal_1_1Nested_1_1Like_1_1Usual`\n - :ref:`exhale_class_classspecial_1_1ImageBuffer`\n - :ref:`exhale_struct_structspecial_1_1ImageBuffer_1_1Data`\n - :ref:`exhale_struct_structspecial_1_1ImageBuffer_1_1SomeThing`\n - :ref:`exhale_class_classspecial_1_1ImageBuffer_3_01Image_3_011920_00_011080_01_4_00_01float_00_01128_01_4`\n - :ref:`exhale_struct_structspecial_1_1ImageBuffer_3_01Image_3_011920_00_011080_01_4_00_01float_00_01128_01_4_1_1Data`\n - :ref:`exhale_struct_structspecial_1_1ImageBuffer_3_01Image_3_011920_00_011080_01_4_00_01float_00_01128_01_4_1_1SomeThing`\n - :ref:`exhale_class_classspecial_1_1ImageBuffer_3_01TImage_00_01Tdata__t_00_014_01_4`\n - :ref:`exhale_struct_structspecial_1_1ImageBuffer_3_01TImage_00_01Tdata__t_00_014_01_4_1_1Data`\n - :ref:`exhale_struct_structspecial_1_1ImageBuffer_3_01TImage_00_01Tdata__t_00_014_01_4_1_1SomeThing`\n- :ref:`exhale_struct_structtop__level`\n'}
Ground truth for the three versions of class hierarchies.
Keys and what they represent:
"default_rst_list"The reStructuredText list version (
createTreeView=False)."collapsible_lists"The collapsible lists version of the tree view (raw html unordered list).
"bootstrap"The bootstrap version of the tree view (raw JavaScript function returning json data).
- testing.tests.configs_tree_view_data.file_hierarchy_ground_truth = {'bootstrap': '<div id="file-treeView"></div>\n<script type="text/javascript">\n function getFileHierarchyTree() {\n return [\n {\n text: "<span class=\\"text-muted\\">Directory</span> include",\n href: "dir_include.html#dir-include",\n selectable: false,\n tags: [\'3\'],\n nodes: [\n {\n text: "<span class=\\"text-muted\\">Directory</span> nested",\n href: "dir_include_nested.html#dir-include-nested",\n selectable: false,\n tags: [\'3\'],\n nodes: [\n {\n text: "<span class=\\"text-muted\\">Directory</span> dual_nested",\n href: "dir_include_nested_dual_nested.html#dir-include-nested-dual-nested",\n selectable: false,\n tags: [\'2\'],\n nodes: [\n {\n text: "<span class=\\"text-muted\\">Directory</span> one",\n href: "dir_include_nested_dual_nested_one.html#dir-include-nested-dual-nested-one",\n selectable: false,\n tags: [\'1\'],\n nodes: [\n {\n text: "<span class=\\"text-muted\\">File</span> one.hpp",\n href: "file_include_nested_dual_nested_one_one.hpp.html#file-include-nested-dual-nested-one-one.hpp",\n selectable: false,\n },\n ]\n },\n {\n text: "<span class=\\"text-muted\\">Directory</span> two",\n href: "dir_include_nested_dual_nested_two.html#dir-include-nested-dual-nested-two",\n selectable: false,\n tags: [\'1\'],\n nodes: [\n {\n text: "<span class=\\"text-muted\\">File</span> two.hpp",\n href: "file_include_nested_dual_nested_two_two.hpp.html#file-include-nested-dual-nested-two-two.hpp",\n selectable: false,\n },\n ]\n },\n ]\n },\n {\n text: "<span class=\\"text-muted\\">Directory</span> one",\n href: "dir_include_nested_one.html#dir-include-nested-one",\n selectable: false,\n tags: [\'1\'],\n nodes: [\n {\n text: "<span class=\\"text-muted\\">File</span> one.hpp",\n href: "file_include_nested_one_one.hpp.html#file-include-nested-one-one.hpp",\n selectable: false,\n },\n ]\n },\n {\n text: "<span class=\\"text-muted\\">Directory</span> two",\n href: "dir_include_nested_two.html#dir-include-nested-two",\n selectable: false,\n tags: [\'1\'],\n nodes: [\n {\n text: "<span class=\\"text-muted\\">File</span> two.hpp",\n href: "file_include_nested_two_two.hpp.html#file-include-nested-two-two.hpp",\n selectable: false,\n },\n ]\n },\n ]\n },\n {\n text: "<span class=\\"text-muted\\">File</span> nesting_specializations.hpp",\n href: "file_include_nesting_specializations.hpp.html#file-include-nesting-specializations.hpp",\n selectable: false,\n },\n {\n text: "<span class=\\"text-muted\\">File</span> top_level.hpp",\n href: "file_include_top_level.hpp.html#file-include-top-level.hpp",\n selectable: false,\n },\n ]\n },\n ]\n }\n</script><!-- end getFileHierarchyTree() function -->\n', 'collapsible_lists': '<ul class="treeView" id="file-treeView">\n <li>\n <ul class="collapsibleList">\n <li class="lastChild">\n Directory <a href="dir_include.html#dir-include">include</a>\n <ul>\n <li>\n Directory <a href="dir_include_nested.html#dir-include-nested">nested</a>\n <ul>\n <li>\n Directory <a href="dir_include_nested_dual_nested.html#dir-include-nested-dual-nested">dual_nested</a>\n <ul>\n <li>\n Directory <a href="dir_include_nested_dual_nested_one.html#dir-include-nested-dual-nested-one">one</a>\n <ul>\n <li class="lastChild">File <a href="file_include_nested_dual_nested_one_one.hpp.html#file-include-nested-dual-nested-one-one.hpp">one.hpp</a></li>\n </ul>\n </li>\n <li class="lastChild">\n Directory <a href="dir_include_nested_dual_nested_two.html#dir-include-nested-dual-nested-two">two</a>\n <ul>\n <li class="lastChild">File <a href="file_include_nested_dual_nested_two_two.hpp.html#file-include-nested-dual-nested-two-two.hpp">two.hpp</a></li>\n </ul>\n </li>\n </ul>\n </li>\n <li>\n Directory <a href="dir_include_nested_one.html#dir-include-nested-one">one</a>\n <ul>\n <li class="lastChild">File <a href="file_include_nested_one_one.hpp.html#file-include-nested-one-one.hpp">one.hpp</a></li>\n </ul>\n </li>\n <li class="lastChild">\n Directory <a href="dir_include_nested_two.html#dir-include-nested-two">two</a>\n <ul>\n <li class="lastChild">File <a href="file_include_nested_two_two.hpp.html#file-include-nested-two-two.hpp">two.hpp</a></li>\n </ul>\n </li>\n </ul>\n </li>\n <li>File <a href="file_include_nesting_specializations.hpp.html#file-include-nesting-specializations.hpp">nesting_specializations.hpp</a></li>\n <li class="lastChild">File <a href="file_include_top_level.hpp.html#file-include-top-level.hpp">top_level.hpp</a></li>\n </ul>\n </li>\n </ul>\n </li><!-- only tree view element -->\n</ul><!-- /treeView file-treeView -->\n', 'default_rst_list': '- :ref:`dir_include`\n - :ref:`dir_include_nested`\n - :ref:`dir_include_nested_dual_nested`\n - :ref:`dir_include_nested_dual_nested_one`\n - :ref:`file_include_nested_dual_nested_one_one.hpp`\n - :ref:`dir_include_nested_dual_nested_two`\n - :ref:`file_include_nested_dual_nested_two_two.hpp`\n - :ref:`dir_include_nested_one`\n - :ref:`file_include_nested_one_one.hpp`\n - :ref:`dir_include_nested_two`\n - :ref:`file_include_nested_two_two.hpp`\n - :ref:`file_include_nesting_specializations.hpp`\n - :ref:`file_include_top_level.hpp`\n'}
Ground truth for the three versions of file hierarchies.
Keys and what they represent:
"default_rst_list"The reStructuredText list version (
createTreeView=False)."collapsible_lists"The collapsible lists version of the tree view (raw html unordered list).
"bootstrap"The bootstrap version of the tree view (raw JavaScript function returning json data).
configs_tree_view
Tests specifically focused on the various tree view configurations.
- class testing.tests.configs_tree_view.TreeViewHierarchyTests(methodName='runTest')[source]
Naive tests on raw “reStructuredText” generated for tree views.
- test_project = 'cpp_nesting'
Test Project Source
The
cpp_nestingtest project. - Additional documentation:testing.projects.cpp_nesting. - Source code for cpp_nesting available here. See also:ExhaleTestCase.test_project.Note
The
cpp_nestingproject is just being recycled, the tests for that project take place inCPPNesting.
- html_hierarchies()[source]
Hierarchy text from
{class,file}_view_hierarchy.rst.When
createTreeView=True, the generated page has something like:Class View Hierarchy -------------------- .. raw:: html <ul> <li> ... </li> <!-- ... --> <li> ... </li> </ul> .. end raw html for treeView
What this method does is simply search for
.. raw:: htmland.. endrespectively, accumulating everything in between. Since we are performing direct string comparisons with “ground truth” values, we specifically accumulateline.strip()to remove the leading indentation since it is under a.. raw:: htmldirective. Finally, the returned output is filtered usingfilter_empty_lines().
- line_compare(expected_list, test_list)[source]
Compare two lists of strings.
Performs two tests:
That
len(expected_list)andlen(test_list)are the same.That the order and values of strings in
expected_listare the same astest_list. Mismatched values will be printed in the assertion.
- line_compare_minified(expected_list, test_list, bootstrap=False)[source]
Compare two lists of tree view strings.
This responsible expects the same input as
line_compare(), but does some additional processing on theexpected_list. To explain, let’s take a look at the lines involved in the actual minified output:Index
Collapsible Lists (HTML Unordered List)
Bootstrap Version (JavaScript Function Returning JSON)
0
<ul class="treeView" id="class-treeView"><script type="text/javascript">1
<li>function getClassHierarchyTree() {2
<ul class="collapsibleList">return [3
<<< really long >>><<< really long >>>4
</ul>]5
</li><!-- only tree view element -->}6
</ul><!-- /treeView class-treeView --></script><!-- end getClassHierarchyTree() function --></div>By convenience and design, line
3is really the thing we want to test, because that is the meat of the tree view. For completeness indices[0,3)and[4,6]are also validated, but constructing line3from the providedexpected_list(the non-minified ground truth) is the focus of this test function.
- html_ground_truth_list(hierarchy, key)[source]
Ground truth data for html-based validation tests.
- Parameters
hierarchy(str)Should only be
"class"or"file". Indexes intoclass_hierarchy_ground_truthandfile_hierarchy_ground_truthrespectively.key(str)The key to lookup in either
class_hierarchy_ground_truthorfile_hierarchy_ground_truth. Specifically, you really only want to be using"collapsible_lists"or"bootstrap", since the raw reStructuredText version (createTreeView=False) can be compared “directly”.
- Return (
listofstr) The text specified by
hierarchy[key], with every line split and lines filtered byfilter_empty_lines().
- test_collapsible_lists()[source]
Verify the un-minified collapsible lists html unordered list appears as expected.
- test_collapsible_lists_minified()[source]
Verify the minified collapsible lists html unordered list appears as expected.
- test_bootstrap_minified()[source]
Verify the minified bootstrap json data list appears as expected.
- test_project_module = <module 'testing.projects.cpp_nesting' from '/home/docs/checkouts/readthedocs.org/user_builds/exhale/checkouts/stable/testing/projects/cpp_nesting/__init__.py'>
utils
Tests for validating parts of exhale.utils.
- testing.tests.utils.templates = [('', []), ('foo', ['foo']), ('ns::foo', ['ns::foo']), ('foo< 12 >', ['foo', ['12']]), ('ns::foo< int, 66 >', ['ns::foo', ['int', '66']]), ('ns::foo< x, y, z >', ['ns::foo', ['x', 'y', 'z']]), ('foo< std::array< int > >', ['foo', ['std::array', ['int']]]), ('bar< Cls< x, y, z > >', ['bar', ['Cls', ['x', 'y', 'z']]]), ('baz< Cls< x >, y, z >', ['baz', ['Cls', ['x'], 'y', 'z']]), ('baz< x, Cls< y, z >, w >', ['baz', ['x', 'Cls', ['y', 'z'], 'w']]), ('boo< a, b, c, Cls< d, e, f > >', ['boo', ['a', 'b', 'c', 'Cls', ['d', 'e', 'f']]]), ('rawr< A< B< C > > >', ['rawr', ['A', ['B', ['C']]]]), ('f< a, B< c, D< e > >, F< g, H< i, J< k, l > > > >', ['f', ['a', 'B', ['c', 'D', ['e']], 'F', ['g', 'H', ['i', 'J', ['k', 'l']]]]]), ('special::ImageBuffer< Image< 1920, 1080 > >::Data', ['special::ImageBuffer', ['Image', ['1920', '1080']], '::Data']), ('special::unique::Nonsense< 11, snowflake::Ontology< 11 > >', ['special::unique::Nonsense', ['11', 'snowflake::Ontology', ['11']]]), ('special::unique::Nonsense< 11, snowflake::Ontology< 11 >::test >::what', ['special::unique::Nonsense', ['11', 'snowflake::Ontology', ['11'], '::test'], '::what'])]
Shared template test case parameters, (node_name, template_tokens expected value).
Warning
Test cases are unfortunately whitespace sensitive, the node_name string must have exactly 1 space after any
<and exactly one space before any>.
- testing.tests.utils.extra_templates = [('special::complex::Fold< typename... \t\t\t \t Ts>', ['special::complex::Fold', ['typename... Ts']]), ('special::complex::Fold< typename \t ... Ts >', ['special::complex::Fold', ['typename ... Ts']]), ('special::complex::Fold<typename \t \t ...Ts>', ['special::complex::Fold', ['typename ...Ts']]), ('has_type_member< T , void_t < typename T::type >', ['has_type_member', ['T', 'void_t', ['typename T::type']]]), ('template <class...>', ['template', ['class...']]), ('template< class, class=void >', ['template', ['class', 'class=void']]), ('template<class, class = void>', ['template', ['class', 'class = void']]), ('template <const int* I>', ['template', ['const int* I']]), ('template < const int * I>', ['template', ['const int * I']]), ('template <const int& I>', ['template', ['const int& I']]), ('template <const int &I>', ['template', ['const int &I']])]
Only used for testing
tokenize_template()(not joining back to the original name). These tests include some more complicated templates to ensure the regular expression matching is valid, and some permutations of the whitespace as well for testing how tokens are getting split.
- testing.tests.utils.test_tokenize_template(node_name, expected)[source]
Tests for
tokenize_template().
- testing.tests.utils.test_join_template_tokens(node_name)[source]
Tests for
join_template_tokens().
- testing.tests.utils.test_join_template_tokens_edge_cases()[source]
Edge case tests for
join_template_tokens().
Project Tests
c_maths
Tests for the c_maths project.
- class testing.tests.c_maths.CMathsTests(methodName='runTest')[source]
Primary test class for project
c_maths.- test_project = 'c_maths'
Test Project Source
The
c_mathstest project. - Additional documentation:testing.projects.c_maths. - Source code for c_maths available here. See also:ExhaleTestCase.test_project.
- test_project_module = <module 'testing.projects.c_maths' from '/home/docs/checkouts/readthedocs.org/user_builds/exhale/checkouts/stable/testing/projects/c_maths/__init__.py'>
- class testing.tests.c_maths.CMathsTestsNoRun(methodName='runTest')[source]
Secondary test case for project
c_maths.A
testing.decorators.no_run()decorated test class.- test_project = 'c_maths'
Test Project Source
The
c_mathstest project. - Additional documentation:testing.projects.c_maths. - Source code for c_maths available here. See also:ExhaleTestCase.test_project.
- test_project_module = <module 'testing.projects.c_maths' from '/home/docs/checkouts/readthedocs.org/user_builds/exhale/checkouts/stable/testing/projects/c_maths/__init__.py'>
cpp_fortran_mixed
Tests for the cpp_fortran_mixed project.
- class testing.tests.cpp_fortran_mixed.CPPFortranMixed(methodName='runTest')[source]
Primary test class for project
cpp_fortran_mixed.This test class exists to test explicit language lexer mappings via
lexerMapping. Note that the C++ code and namespaceconvertis definitively chosen to be different than the name of the fortran module name (conversions). If they are the same, some interesting things happen on the Doxygen side, because Doxygen will combine the namespaces.Todo
These tests are incomplete (
from __future__ import config_objects). The module level storage creates conflicts between the test cases when specifying the regular expressions :/Currently there is only one test for a custom lexer mapping, and it only actually works because the name is alphabetically sorted after the default test (meaning pytest will run it after).
Todo
The full function validation does not support templates (yet). Templates at large in the testing framework need to be reworked, currently it is all boiler plate code with no actual validation…
- test_project = 'cpp_fortran_mixed'
Test Project Source
The
cpp_fortran_mixedtest project. - Additional documentation:testing.projects.cpp_fortran_mixed. - Source code for cpp_fortran_mixed available here. See also:ExhaleTestCase.test_project.
- test_hierarchies()[source]
Validate the class and file hierarchies.
Not tested on Windows, maybe I’ll care to fix it one day. But it is not this day!
Todo
Too much shared code in hierarchy comparisons, the class hierarchy for this project should be empty. Need to enable asserting this fact (same for the
cpp_nestingproject).
- validate_pygments_lexers(exhale_root, node_map)[source]
Validate nodes have the expected pygments lexer in their program listing file.
Parameters
exhale_root(exhale.graph.ExhaleRoot)The graph root object for this project.
node_map(dict)A map of
exhale.graph.ExhaleNodeobjects to string values. The keys must be the nodes extracted from theexhale_root(as opposed to a testing type). Each value should be a pygments lexer, such as"cpp"or"fortran".The generated program listing file will be parsed and an assert statement performed for equality to these specified values.
- get_hpp_and_f90_nodes(exhale_root)[source]
Return the two
ExhaleNodeobjects for this project.Parameters
exhale_root(ExhaleRoot)The graph root object for this project.
Returns
tupleA length two tuple of
ExhaleNodeobjects, ordered as(convert_hpp, conversions_f90). These represent the filesinclude/convert/convert.hppandsrc/conversions.f90, respectively.
- test_project_module = <module 'testing.projects.cpp_fortran_mixed' from '/home/docs/checkouts/readthedocs.org/user_builds/exhale/checkouts/stable/testing/projects/cpp_fortran_mixed/__init__.py'>
cpp_long_names
Tests for the cpp_long_names project.
- testing.tests.cpp_long_names.create_absurd_directory_structure()[source]
Create the absurd directory structure when
testing.projects.cpp_long_names.RUN_ABSURD_TESTisTrue.Helper function for the testing fixture
potentially_with_insanity_fixture().
- testing.tests.cpp_long_names.remove_absurd_directory_structure()[source]
Remove the absurd directory structure when
testing.projects.cpp_long_names.RUN_ABSURD_TESTisTrue.Helper function for the testing fixture
potentially_with_insanity_fixture().
- testing.tests.cpp_long_names.potentially_with_insanity_fixture()[source]
Class-level fixture that may create / remove the absurd directory.
This will create the absurd directory structure before any tests are run, and remove it when all are finished when
testing.projects.cpp_long_names.RUN_ABSURD_TESTisTrue.
- testing.tests.cpp_long_names.potentially_with_insanity(cls)[source]
Mark
clsto use the fixturepotentially_with_insanity().Parameters
cls(CPPLongNames)Decorator designed only for
CPPLongNames.Return (
CPPLongNames)The input
cls, after executingpytest.mark.usefixtures.
- class testing.tests.cpp_long_names.CPPLongNames(methodName='runTest')[source]
Primary test class for project
cpp_long_names.- test_project = 'cpp_long_names'
Test Project Source
The
cpp_long_namestest project. - Additional documentation:testing.projects.cpp_long_names. - Source code for cpp_long_names available here. See also:ExhaleTestCase.test_project.
- test_file_hierarchy()[source]
Verify the file hierarchy.
The class hierarchy is not validated for this test project simply because doing so is rather pointless, and the added complexity to do so given the conditionally created structure is not worth the effort.
- test_project_module = <module 'testing.projects.cpp_long_names' from '/home/docs/checkouts/readthedocs.org/user_builds/exhale/checkouts/stable/testing/projects/cpp_long_names/__init__.py'>
cpp_dir_underscores
Tests for the cpp_dir_underscores project.
- class testing.tests.cpp_dir_underscores.CPPDirUnderscores(methodName='runTest')[source]
Primary test class for project
cpp_dir_underscores.- test_project = 'cpp_dir_underscores'
Test Project Source
The
cpp_dir_underscorestest project. - Additional documentation:testing.projects.cpp_dir_underscores. - Source code for cpp_dir_underscores available here. See also:ExhaleTestCase.test_project.
- check_title_link(name_map, node_map, t_type)[source]
Verify the
titleandlink_nameof the specified nodes.Note
It is assumed that the
name_mapandnode_mapparameters have the exact same set of keys.
- test_project_module = <module 'testing.projects.cpp_dir_underscores' from '/home/docs/checkouts/readthedocs.org/user_builds/exhale/checkouts/stable/testing/projects/cpp_dir_underscores/__init__.py'>
cpp_nesting
Tests for the cpp_nesting project.
- class testing.tests.cpp_nesting.CPPNesting(methodName='runTest')[source]
Primary test class for project
cpp_nesting.- test_project = 'cpp_nesting'
Test Project Source
The
cpp_nestingtest project. - Additional documentation:testing.projects.cpp_nesting. - Source code for cpp_nesting available here. See also:ExhaleTestCase.test_project.
- test_hierarchies_stripped()[source]
Verify the class and file hierarchies with
doxygenStripFromPath=../include.
- test_project_module = <module 'testing.projects.cpp_nesting' from '/home/docs/checkouts/readthedocs.org/user_builds/exhale/checkouts/stable/testing/projects/cpp_nesting/__init__.py'>
- class testing.tests.cpp_nesting.CPPNestingPages(methodName='runTest')[source]
Primary test class for project
doxygenpage.Note
Setup for this test is particularly fickle. There are only two test cases because there are only two file paths we generate. Order of tests is not guaranteed, so each test needs to exclude it’s alternate. Eww.
- test_project = 'cpp_nesting'
Test Project Source
The
cpp_nestingtest project. - Additional documentation:testing.projects.cpp_nesting. - Source code for cpp_nesting available here. See also:ExhaleTestCase.test_project.
- check_most_pages(uses_mainpage=True, main_refid='indexpage')[source]
Check the majority of the page generation.
- test_project_module = <module 'testing.projects.cpp_nesting' from '/home/docs/checkouts/readthedocs.org/user_builds/exhale/checkouts/stable/testing/projects/cpp_nesting/__init__.py'>
cpp_pimpl
Tests for the cpp_nesting project.
- class testing.tests.cpp_pimpl.TestedExclusionTypes[source]
An “enum” for listing exclusions we care about.
Yes, I still need to support python 2.
- NoExclusions = 0
No exclusions were requested.
- AllImpl = 1
All
r".*Impl$"should be excluded.
- DetailImpl = 2
Only
r".*detail::.*Impl$"should be excluded.
- class testing.tests.cpp_pimpl.CPPPimpl(methodName='runTest')[source]
Primary test class for project
cpp_pimpl.- test_project = 'cpp_pimpl'
Test Project Source
The
cpp_pimpltest project. - Additional documentation:testing.projects.cpp_pimpl. - Source code for cpp_pimpl available here. See also:ExhaleTestCase.test_project.
- link_name_format_dict()[source]
Return a dictionary suitable for using with
str.format.Since Doxygen will behave differently on different platforms with respect to what the specific
refidof a given node is, which affect the generatedlink_namefor a givenExhaleNode, they must be searched for after exhale runs for the given test function.- Return (
dict) A dictionary with string keys and string values is returned, the key-value pairs are
{name}:{compound.link_name}:Key
C++ Compound
link_name"pimpl"namespace pimpl"pimpl_detail"namespace detail::pimpl"pimpl_detail_EarthImpl"class pimpl::detail::EarthImpl"pimpl_detail_JupiterImpl"class pimpl::detail::JupiterImpl"pimpl_Earth"class pimpl::Earth"pimpl_Earth_v2"class pimpl::Earth_v2"pimpl_EarthImpl"class pimpl::EarthImpl"pimpl_Jupiter"class pimpl::Jupiter"pimpl_Jupiter_v2"class pimpl::Jupiter_v2"pimpl_JupiterImpl"class pimpl::JupiterImpl"pimpl_Planet"class pimpl::Planet
- Return (
- expected_class_hierarchy(exclusions)[source]
Return expected rst class hierarchy listing based on specified
exclusions.Helper method for
validate_class_hierarchy().Parameters
exclusions(TestedExclusionTypes)The exclusion that is currently being tested.
- Return (
str) The expected rst class listing. If
exclusionsis invalid, then the string"INTERNAL TESTING ERROR"is returned.
- validate_class_hierarchy(exclusions)[source]
Validate generated class hierarchy rst list is correct based on
exclusions.Parameters
exclusions(TestedExclusionTypes)The exclusion that is currently being tested.
- validate_namespace_listings(exclusions)[source]
Validate generated namespace rst listings are correct based on
exclusions.This project contains two namespaces that are tested:
namespace pimplandnamespace pimpl::detail.Parameters
exclusions(TestedExclusionTypes)The exclusion that is currently being tested.
- validate_file_listings()[source]
Validate
{earth,jupiter}.hpplink to all items (regardless of"listingExclude").
- test_no_listing_exclusions()[source]
Verify empty listing exclude results in no change in listed API.
- test_project_module = <module 'testing.projects.cpp_pimpl' from '/home/docs/checkouts/readthedocs.org/user_builds/exhale/checkouts/stable/testing/projects/cpp_pimpl/__init__.py'>
- test_impl_exclude_ignorecase()[source]
Verify
r".*impl$withre.IGNORECASEexcludes*Implitems.
- test_detail_impl_exclude_ignorecase()[source]
Verify
r".*detail::.*impl$withre.IGNORECASEexcludes*detail::*Implitems.
cpp with spaces
Tests for the cpp_with_spaces project.
- class testing.tests.cpp_with_spaces.CPPWithSpaces(methodName='runTest')[source]
Primary test class for project
cpp with spaces.- test_project = 'cpp with spaces'
Test Project Source
The
cpp with spacestest project. - Additional documentation:testing.projects.cpp_with_spaces. - Source code for cpp with spaces available here. See also:ExhaleTestCase.test_project.
- test_hierarchies()[source]
Verify the class and file hierarchies.
Todo
Class hierarchy not tested here, need to revisit that part of the testing framework as well as stop emitting a “Class Hierarchy” on the root api page when it is empty.
- test_project_module = <module 'testing.projects.cpp with spaces' from '/home/docs/checkouts/readthedocs.org/user_builds/exhale/checkouts/stable/testing/projects/cpp with spaces/__init__.py'>