Navigation Menu

Skip to content

Commit

Permalink
Do not remove the generated svg after the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohamed El Mouctar HAIDARA committed Mar 25, 2019
1 parent 99f86ca commit 54ad58e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 17 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -105,4 +105,5 @@ venv.bak/
# mypy
.mypy_cache/

.idea
.idea
generated_svg
20 changes: 4 additions & 16 deletions tests/test_grapher.py
Expand Up @@ -12,6 +12,10 @@ def run_grapher(args):

cli.parse()

# put the generated svg in a dedicated folder
dir_path = os.path.dirname(os.path.realpath(__file__)) # current file directory
cli.options.output_filename = os.path.join(dir_path, "generated_svg", cli.options.output_filename)

return cli.run()


Expand Down Expand Up @@ -72,8 +76,6 @@ def test_grapher_simple_playbook():

_common_tests(svg_path=svg_path, playbook_path=playbook_path, plays_number=1, post_tasks_number=2)

os.remove(svg_path)


def test_grapher_example():
"""
Expand All @@ -89,8 +91,6 @@ def test_grapher_example():
_common_tests(svg_path=svg_path, playbook_path=path_playbook_path, plays_number=1, tasks_number=4,
post_tasks_number=2, pre_tasks_number=2)

os.remove(svg_path)


def test_grapher_example_include_task():
"""
Expand All @@ -104,8 +104,6 @@ def test_grapher_example_include_task():

_common_tests(svg_path=svg_path, playbook_path=playbook_path, plays_number=1, tasks_number=6)

os.remove(svg_path)


def test_grapher_example_include_tasks():
"""
Expand All @@ -119,8 +117,6 @@ def test_grapher_example_include_tasks():

_common_tests(svg_path=svg_path, playbook_path=playbook_path, plays_number=1, tasks_number=4)

os.remove(svg_path)


def test_example_with_roles():
"""
Expand All @@ -135,8 +131,6 @@ def test_example_with_roles():
_common_tests(svg_path=svg_path, playbook_path=playbook_path, plays_number=1, tasks_number=5, post_tasks_number=2,
pre_tasks_number=2, roles_number=1)

os.remove(svg_path)


def test_example_import_role():
"""
Expand All @@ -150,8 +144,6 @@ def test_example_import_role():

_common_tests(svg_path=svg_path, playbook_path=playbook_path, plays_number=1, tasks_number=3, roles_number=1)

os.remove(svg_path)


def test_example_include_role():
"""
Expand All @@ -165,8 +157,6 @@ def test_example_include_role():

_common_tests(svg_path=svg_path, playbook_path=playbook_path, plays_number=1, tasks_number=3)

os.remove(svg_path)


def test_example_with_block():
"""
Expand All @@ -180,8 +170,6 @@ def test_example_with_block():

_common_tests(svg_path=svg_path, playbook_path=playbook_path, plays_number=1, tasks_number=3)

os.remove(svg_path)


def test_example_nested_include_tasks():
"""
Expand Down

0 comments on commit 54ad58e

Please sign in to comment.