Skip to content

Latest commit

 

History

History
42 lines (29 loc) · 811 Bytes

File metadata and controls

42 lines (29 loc) · 811 Bytes

NetworkPingComparator

NetworkPingComparator is a Python module for pinging two networks and displaying the difference in host reponses.

Installation

Requires pytest~=6.2.4

Use the package manager pip to install requirements.

pip install -r requirements

Usage

from network_ping_comparator import NetworkPingComparator

# define networks to test
NETWORK_1 = "192.168.1.0/24"
NETWORK_2 = "192.168.2.0/24"

# list of excluded addresses
EXCLUDED_HOST = ["0", "255"]

comparator = NetworkPingComparator(NETWORK_1, NETWORK_2)
comparator.exclude_host(EXCLUDED_HOST)
comparator.run()
result = comparator.output()

Test

Unit tests are in ./tests/

Run using pytest at root project directory

./pytest

License

[None]