1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
�
S�"i� � � � d Z ddlZddlmc mZ ddlZddlZddl Z d� Z
d� Zd� Zd� Z
edk( r e j eg� yy)z$Unit test for library initialization� Nc � � ddl } | j � }d}||u}|s�t j d|fd||f� dt j
� v st j |� rt j |� ndt j |� d�z }dd|iz }t t j |� � �dx}}|j � y) z6Test library initialization with default configurationr N��is not�z%(py0)s is not %(py3)s�library��py0�py3�assert %(py5)s�py5��otlp_arrow_library�
PyOtlpLibrary�
@pytest_ar�_call_reprcompare�@py_builtins�locals�_should_repr_global_name� _saferepr�AssertionError�_format_explanation�shutdown�r r �@py_assert2�@py_assert1�@py_format4�@py_format6s �K/Users/mark.olliver/GIT/otlp-rust-service/tests/python/test_library_init.py�test_library_init_defaultr sz � �� �.�.�0�G���7�$�����7�$�������7����7����$�������� ���� c �� � ddl } t j � 5 }| j |�� }d}||u}|s�t j
d|fd||f� dt
j � v st j |� rt j |� ndt j |� d�z }dd |iz }t t j |� � �dx}}t j }|j }t j }|j } d
}
d} | ||
|� } ||� }
|
�s�dd
t
j � v st j t � rt j t � nd
t j |� t j |� d
t
j � v st j t � rt j t � nd
t j |� t j | � dt
j � v st j |� rt j |� ndt j |
� t j |� t j |� t j |
� d�z }t t j |� � �dx}x}x}x} x}
x}x}}
t j }|j }t j }|j } d
}
d} | ||
|� } ||� }
|
�s�dd
t
j � v st j t � rt j t � nd
t j |� t j |� d
t
j � v st j t � rt j t � nd
t j |� t j | � dt
j � v st j |� rt j |� ndt j |
� t j |� t j |� t j |
� d�z }t t j |� � �dx}x}x}x} x}
x}x}}
|j! � ddd� y# 1 sw Y yxY w)z8Test library initialization with custom output directoryr N)�
output_dirr r r r r r �otlp�tracesz�assert %(py18)s
{%(py18)s = %(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.path
}.exists
}(%(py16)s
{%(py16)s = %(py9)s
{%(py9)s = %(py7)s
{%(py7)s = %(py5)s.path
}.join
}(%(py10)s, %(py12)s, %(py14)s)
})
}�os�tmpdir)r �py2�py4r �py7�py9�py10�py12�py14�py16�py18�metrics)r �tempfile�TemporaryDirectoryr r r r r r r r r r% �path�exists�joinr )r r&