Skip to content

Commit

Permalink
add test for common
Browse files Browse the repository at this point in the history
  • Loading branch information
antonylebechec committed May 8, 2024
1 parent 44d6ca1 commit 38f4b30
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions tests/test_commons.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,50 @@
from test_needed import *


def test_help():

# Init
help_json_file = os.path.join(folder_main, "docs", "json", "help.param.json")

# Help JSON to MD
help_content_md = help_generation_from_json(
help_json_file=help_json_file,
output_type="markdown",
title="test",
code_type="json",
)
assert help_content_md != ""

# Help JSON to HTML
help_content_html = help_generation_from_json(
help_json_file=help_json_file,
output_type="html",
title="test",
code_type="json",
)
assert help_content_html != ""

# Help
from howard.tools.tools import arguments, commands_arguments, shared_arguments

setup_cfg = f"{main_folder}/../../setup.cfg"
arguments_dict = {
"arguments": arguments,
"commands_arguments": commands_arguments,
"shared_arguments": shared_arguments,
}
help_content = help_generation(
arguments_dict=arguments_dict, setup=setup_cfg, output_type="markdown"
)
assert help_content != ""

# Gooey argument
argument_gooey = get_argument_gooey(
arguments=arguments, arg=list(arguments.keys())[0]
)
assert argument_gooey != ""


def test_identical_with_identical_files():
with tempfile.NamedTemporaryFile(
mode="w", delete=False
Expand Down

0 comments on commit 38f4b30

Please sign in to comment.