How to use the networkml.NetworkML.NetworkML function in networkml

To help you get started, we’ve selected a few networkml examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github CyberReboot / NetworkML / tests / test_networkml.py View on Github external
def run_networkml(args, expected_code=0):
    sys.argv = ['bin/networkml'] + args
    if expected_code:
        with pytest.raises(SystemExit) as pytest_wrapped_e:
            netml = NetworkML()
            assert pytest_wrapped_e.type == SystemExit
            assert pytest_wrapped_e.value.code == expected_code
            return netml
    else:
        return NetworkML()
github CyberReboot / NetworkML / tests / test_networkml.py View on Github external
def run_networkml(args, expected_code=0):
    sys.argv = ['bin/networkml'] + args
    if expected_code:
        with pytest.raises(SystemExit) as pytest_wrapped_e:
            netml = NetworkML()
            assert pytest_wrapped_e.type == SystemExit
            assert pytest_wrapped_e.value.code == expected_code
            return netml
    else:
        return NetworkML()