
    Wpf	                         d Z ddlZddlmZ ddlmZ ej        Z G d dej                  Ze	dk    r ej
                     dS dS )z9Tests for mediapipe.python._framework_bindings.timestamp.    N)absltest)	timestampc                   2    e Zd Zd Zd Zd Zd Zd Zd ZdS )TimestampTestc                     t          d          }|                     |j        d           |                     |d           |                     t          |          d           d S )Nd   z%<mediapipe.Timestamp with value: 100>)	TimestampassertEqualvaluestr)selfts     _/var/www/html/nettyfy-visnx/env/lib/python3.11/site-packages/mediapipe/python/timestamp_test.pytest_timestampzTimestampTest.test_timestamp   s^    #AQWc"""QSVVDEEEEE    c                 n    t          d          }t          |          }|                     ||           d S )Nr   )r	   r
   r   ts1ts2s      r   test_timestamp_copy_constructorz-TimestampTest.test_timestamp_copy_constructor"   s4    
C..C
C..CS#r   c                     t          d          }t          d          }|                     ||           t          d          }|                     ||           d S )Nr      )r	   r
   assertNotEqual)r   r   r   ts3s       r   test_timestamp_comparsionz'TimestampTest.test_timestamp_comparsion'   sU    
C..C
C..CS#
C..CS!!!!!r   c                    t           j        }|                     t          |          d           t           j        }|                     t          |          d           t           j        }|                     t          |          d           t           j        }|                     t          |          d           t           j        }|                     t          |          d           t           j        }|                     t          |          d           t           j	        }|                     t          |          d           d S )Nz'<mediapipe.Timestamp with value: UNSET>z+<mediapipe.Timestamp with value: UNSTARTED>z+<mediapipe.Timestamp with value: PRESTREAM>z%<mediapipe.Timestamp with value: MIN>z%<mediapipe.Timestamp with value: MAX>z,<mediapipe.Timestamp with value: POSTSTREAM>z&<mediapipe.Timestamp with value: DONE>)
r	   UNSETr
   r   	UNSTARTED	PRESTREAMMINMAX
POSTSTREAMDONE)r   t1t2t3t4t5t6t7s           r   test_timestamp_special_valuesz+TimestampTest.test_timestamp_special_values.   s   	BSWWGHHH		BSWWKLLL		BSWWKLLL	BSWWEFFF	BSWWEFFF		BSWWLMMM	BSWWFGGGGGr   c                    t          d          }t          d          }|                     ||           |                     ||           |                     ||           |                     ||           |                     ||           d S )Nr   e   )r	   assertGreaterassertGreaterEqual
assertLessassertLessEqualr   r   s      r   test_timestamp_comparisonsz(TimestampTest.test_timestamp_comparisons>   s    
C..C
C..CsC   C%%%OOCc"""S!!!!!r   c                     t          j                     }t                              |          }|                     ||                                d           d S )N   )delta)timer	   from_secondsassertAlmostEqualseconds)r   nowtss      r   test_from_secondszTimestampTest.test_from_secondsG   sI    
)++C				$	$B3

A66666r   N)	__name__
__module____qualname__r   r   r   r+   r2   r<    r   r   r   r      st        F F F  
" " "H H H " " "7 7 7 7 7r   r   __main__)__doc__r6   absl.testingr   $mediapipe.python._framework_bindingsr   r	   TestCaser   r=   mainr@   r   r   <module>rG      s    @ ?  ! ! ! ! ! ! : : : : : :	07 07 07 07 07H% 07 07 07f z(-///// r   