conftest.cpython-312-pytest-8.3.4.pyc•1.97 kB
�
��g� � �� � d Z ddlZddlmc mZ ddlZddlm Z ddl
Z
ddlmZ ddl
mZ ddlmZ d� Z e
j$ d� � d
d�� Ze
j$ d
e fd�� Zy)z)Pytest configuration and shared fixtures.� N)� Generator)�load_dotenv)� ApiClient)�
Configurationc �( � | j dd� y)zConfigure custom markers.�markerszKintegration: mark test as an integration test that requires YNAB API accessN)�addinivalue_line)�configs �A/Users/home/1-Dev-Projects/mcp-servers/ynab-mcp/tests/conftest.py�pytest_configurer s � �
����U�� �session)�scope�returnc �r � t d�� t j d� st j d� yy)z%Load environment variables for tests.T)�verbose�YNAB_API_KEY�#YNAB_API_KEY not set in environmentN)r �os�getenv�pytest�skip� r
r � env_setupr s* � � ���
�9�9�^�$����9�:� %r
c # �� K � t j d� st j d� t t j d� �� }t |� 5 }|�� ddd� y# 1 sw Y yxY w�w)z%Create a YNAB API client for testing.r r )�access_tokenN)r r r r r r )r �
configuration�clients r �ynab_clientr sN � �� � �9�9�^�$����9�:�!�r�y�y��/H�I�M� �=� !�V���
"� !� !�s �AA1�A%� A1�%A.�*A1)r N)�__doc__�builtins�@py_builtins�_pytest.assertion.rewrite� assertion�rewrite�
@pytest_arr �typingr r �dotenvr �ynab.api_clientr �ynab.configurationr r �fixturer r r r
r �<module>r, sa �� /� � � � �
� � %� ,�� ����i� �;� !�;� ����i� � �r