o
    wiE                     @   s6   d dl Z d dlZd dlmZ d dlZG dd dZdS )    N)pathc                   @   sl   e Zd Zejjdd Zejjdd Zejjdd Zejjdd Z	ejjd	d
 Z
ejjdd ZdS )TestHydraRunnerc                 C   L   d}t tj tj|dtjtjd W d   dS 1 sw   Y  dS )z@"Test app without config - fields missing causes error.
        zpython tests/hydra/my_app.pyTshellstdoutstderrNpytestraises
subprocessCalledProcessError
check_callsysr   selfcall r   Z/home/ubuntu/sommelier/.venv/lib/python3.10/site-packages/tests/hydra/test_hydra_runner.pytest_no_config      "zTestHydraRunner.test_no_configc                 C   :   d}t j|dtjtjd tdrJ tdrJ dS )z*"Test injection of valid config1.
        z7python tests/hydra/my_app.py --config-name config1.yamlTr   .hydra
my_app.logNr   r   r   r   r   existsr   r   r   r   test_config1"      zTestHydraRunner.test_config1c                 C   r   )z,"Test injection of invalid config1.
        z?python tests/hydra/my_app.py --config-name config1_invalid.yamlTr   Nr	   r   r   r   r   test_config1_invalid1   r   z$TestHydraRunner.test_config1_invalidc                 C   r   )zB"Test injection of valid config2 from a different folder.
        zSpython tests/hydra/my_app.py --config-path config_subdir --config-name config2.yamlTr   r   r   Nr   r   r   r   r   test_config2<   r   zTestHydraRunner.test_config2c                 C   r   )zD"Test injection of invalid config2 from a different folder.
        z[python tests/hydra/my_app.py --config-path config_subdir --config-name config2_invalid.yamlTr   Nr	   r   r   r   r   test_config2_invalidK   r   z$TestHydraRunner.test_config2_invalidc                 C   r   )zU"Test injection of valid config2 - using namepath with schema is prohibited.
        zMpython tests/hydra/my_app.py --config-name config_subdir/config2_invalid.yamlTr   Nr	   r   r   r   r   test_config2_filepath_schemaV   r   z,TestHydraRunner.test_config2_filepath_schemaN)__name__
__module____qualname__r
   markintegrationr   r   r   r   r    r!   r   r   r   r   r      s    







r   )r   r   osr   r
   r   r   r   r   r   <module>   s
   