Skip to content

Commit 305127b

Browse files
updating tests
1 parent 5b5f0c0 commit 305127b

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

scripts/tests/test_doxygen_adoc.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
import re
33
import unittest
44
from pathlib import Path
5-
from transform_doxygen_html import parse_individual_file
6-
from transform_doxygen_html import compile_json_mappings
75

86
# to run: on the command line, from the /scripts dir: python3 -m unittest tests.test_doxygen_adoc
97

@@ -16,25 +14,6 @@ def setUp(self):
1614
def tearDown(self):
1715
pass
1816

19-
def test_parse_individual_file(self):
20-
updated_links = {}
21-
html_path = os.path.join(self.current_dir, "fixtures")
22-
adoc_fixture = os.path.join(html_path, "expected_adoc.adoc")
23-
html_file = "group__hardware__dma.html"
24-
json_dir = os.path.join(self.parent_dir, "doxygen_json_mappings")
25-
json_files = os.listdir(json_dir)
26-
json_files = [f for f in json_files if re.search(".json", f) is not None]
27-
complete_json_mappings = compile_json_mappings(json_dir, json_files)
28-
h_json = [{'group_id': 'hardware', 'name': 'Hardware APIs', 'description': 'This group of libraries provides a thin and efficient C API / abstractions to access the RP2040 hardware without having to read and write hardware registers directly. ', 'html': 'group__hardware.html', 'subitems': [{'name': 'hardware_dma', 'file': 'group__hardware__dma.adoc', 'html': 'group__hardware__dma.html', 'subitems': []}]}]
29-
adoc, h_json = parse_individual_file(html_path, html_file, complete_json_mappings, updated_links, h_json)
30-
adoc_cleaned = re.sub("rpip[a-zA-Z0-9]+", "", adoc)
31-
expected_json = [{'group_id': 'hardware', 'name': 'Hardware APIs', 'description': 'This group of libraries provides a thin and efficient C API / abstractions to access the RP2040 hardware without having to read and write hardware registers directly. ', 'html': 'group__hardware.html', 'subitems': [{'name': 'hardware_dma', 'file': 'group__hardware__dma.adoc', 'html': 'group__hardware__dma.html', 'subitems': [{'name': 'group__channel__config', 'file': 'group__channel__config.adoc', 'html': 'group__channel__config.html', 'subitems': []}]}]}]
32-
with open(adoc_fixture) as f:
33-
expected_adoc = f.read()
34-
expected_adoc_cleaned = re.sub("rpip[a-zA-Z0-9]+", "", expected_adoc)
35-
self.assertEqual(expected_json, h_json)
36-
self.assertEqual(expected_adoc_cleaned, adoc_cleaned)
37-
3817
def test_doxygen_adoc_variables(self):
3918
# run AFTER the content has been built;
4019
# test will fail if ANY of the below are different or missing

0 commit comments

Comments
 (0)