o
    ]i!                     @   sx   d dl Z d dlZd dlZd dlZzd dlZW n ey!   dZY nw dZG dd de jZej	j
edddd	d
ZdS )    NTFc                   @   s   e Zd ZdZdddZdS )
TestIfaddrz
    Unittests for :mod:`ifaddr`.

    There isn't much unit-testing that can be done without making assumptions
    on the system or mocking of operating system APIs. So this just contains
    a sanity check for the moment.
    returnNc                 C   sH   d}t  }|D ]}|jD ]	}|jdkrd}qq| |dt|  d S )NFz	127.0.0.1TzNo adapter has IP 127.0.0.1: %s)ifaddrget_adaptersipsip
assertTruestr)selffoundadaptersadapterr    r   F/home/ubuntu/.local/lib/python3.10/site-packages/ifaddr/test_ifaddr.py$test_get_adapters_contains_localhost   s   

z/TestIfaddr.test_get_adapters_contains_localhostr   N)__name__
__module____qualname____doc__r   r   r   r   r   r      s    r   znetifaces not installed)reasonr   c                  C   s   t j } | t ksJ d S )N)r   	netifaces
interfaces)r   r   r   r   test_netifaces_compatibility(   s   
r   r   )unittestpytestr   ifaddr.netifacesr   ImportErrorskip_netifacesTestCaser   markskipifr   r   r   r   r   <module>   s   