Skip to content

Commit

Permalink
add to unittests for parser
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Osinski committed Jan 3, 2024
1 parent 38ad638 commit 46790e0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions unittests/test_parsers.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from .dojo_test_case import DojoTestCase, get_unit_tests_path
import os
import re

basedir = os.path.join(get_unit_tests_path(), '..')

Expand Down Expand Up @@ -27,6 +28,15 @@ def test_file_existence(self):
os.path.isfile(doc_file),
f"Documentation file '{doc_file}' is missing or using different name"
)

content = open(doc_file).read()
self.assertTrue(re.search("title:", content),
f"Documentation file '{doc_file}' does not contain a title"
)
self.assertTrue(re.search("toc_hide: true", content),
f"Documentation file '{doc_file}' does not contain toc_hide: true"
)


if parser_dir.name not in [
# there is not exception for now
Expand Down

0 comments on commit 46790e0

Please sign in to comment.