diff --git a/tests/test_invocation.py b/tests/test_invocation.py index d217a11e..d86cd4eb 100644 --- a/tests/test_invocation.py +++ b/tests/test_invocation.py @@ -3,6 +3,7 @@ from pathlib import Path import os import pytest +import subprocess from gnpy.tools.cli_examples import transmission_main_example, path_requests_run SRC_ROOT = Path(__file__).parent.parent @@ -22,3 +23,13 @@ def test_example_invocation(capfdbinary, output, handler, args): captured = capfdbinary.readouterr() assert captured.out == expected assert captured.err == b'' + + +@pytest.mark.parametrize('program', ('gnpy-transmission-example', 'gnpy-path-request')) +def test_run_wrapper(program): + '''Ensure that our wrappers really, really work''' + proc = subprocess.run((program, '--help'), stdout=subprocess.PIPE, stderr=subprocess.PIPE, + check=True, universal_newlines=True) + assert proc.stderr == '' + assert 'https://github.com/telecominfraproject/oopt-gnpy' in proc.stdout.lower() + assert 'https://gnpy.readthedocs.io/' in proc.stdout.lower()