This commit is contained in:
Maximilien Rigaut 2022-06-09 17:16:23 +02:00
parent dfc8a7b2d2
commit 6100f716b5
No known key found for this signature in database
GPG Key ID: 4F14B23709ADA5B1
2 changed files with 11 additions and 3 deletions

View File

@ -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)

View File

@ -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)