From 8305f440ab8250a22cbf423f6c7b77e921898934 Mon Sep 17 00:00:00 2001 From: Maximilien Rigaut Date: Thu, 9 Jun 2022 17:16:23 +0200 Subject: [PATCH] Test doc --- tests/modules/test_preparser.py | 4 ++-- tests/modules/test_sitecrawler.py | 10 +++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/modules/test_preparser.py b/tests/modules/test_preparser.py index dec0fb9..c43bb43 100644 --- a/tests/modules/test_preparser.py +++ b/tests/modules/test_preparser.py @@ -246,7 +246,7 @@ def test_make_import_list(filename, content, capsys): ]) def test_preparser_content(filename, content): """ - Test the preparser content + Test the PreParser content """ testfile = temp_name(os.path.join(_BASE_PATH_GIVEN, filename)) assert os.path.exists(testfile) @@ -258,7 +258,7 @@ def test_preparser_content(filename, content): def test_subfolder_parsing(): """ - Test the preparser content + Test the PreParser content """ testfile = temp_name(os.path.join(_BASE_PATH_GIVEN, "superimports.bpr")) assert os.path.exists(testfile) diff --git a/tests/modules/test_sitecrawler.py b/tests/modules/test_sitecrawler.py index 5602f75..d4e0335 100644 --- a/tests/modules/test_sitecrawler.py +++ b/tests/modules/test_sitecrawler.py @@ -24,7 +24,15 @@ files = [ def make_new_file(path, content="", mode="w+"): """ - Make a new file + Make a new file and all the directories in the path + :param path: the path to the file + :type path: str + :param content: the content of the file + :type content: str + :param mode: the mode of the file + :type mode: str + :return: the path to the file + :rtype: str """ name = os.path.join(_TEMP_DIRECTORY.name, path) os.makedirs(os.path.dirname(name), exist_ok=True)