How to use the pyshark.tshark.tshark.get_tshark_version function in pyshark

To help you get started, we’ve selected a few pyshark 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 KimiNewt / pyshark / tests / test_tshark.py View on Github external
def test_get_tshark_version(mock_check_output):
    mock_check_output.return_value = (
        b'TShark 1.12.1 (Git Rev Unknown from unknown)\n\n'b'Copyright '
        b'1998-2014 Gerald Combs  and contributors.\n'
    )
    actual = get_tshark_version()
    expected = '1.12.1'
    assert actual == expected
github KimiNewt / pyshark / src / pyshark / capture / capture.py View on Github external
def _get_tshark_version(self):
        if self.__tshark_version is None:
            self.__tshark_version = get_tshark_version(self.tshark_path)
        return self.__tshark_version