
    eH~j                     :   d dl Zd dlmc mZ d dlZd dlZd dl	m
Z
 d dlZ e
e                                          j        j        Zedz  dz  Z ee          ej        vr$ej                            d  ee                     ej        d             ZdefdZdS )    N)Pathopt	bubblecamc                 x   | dz  }| dz  }|                     dd           |                     dt          |                     |                     dt          |dz                       |                     dt          | d	z                       |                     d
t          |dz                       | ||dS )a"  Point every BubbleCam module at an isolated tmp_path and simulate mode.

    state_lib/reboot_guard read their target paths fresh on every call
    (not a module-level constant), so this works with a plain monkeypatch
    -- no importlib.reload dance needed, and no cross-test leakage.
    rundataBUBBLECAM_SIM1BUBBLECAM_STATE_DIRBUBBLECAM_REBOOT_COUNTERzreboot_attempts.countBUBBLECAM_CONFIGznonexistent-bubblecam.tomlBUBBLECAM_EVENTS_LOGz
events.log)tmp_path	state_dirdata_dir)setenvstr)r   monkeypatchr   r   s       =C:\Users\jvoigtlander\Desktop\BubbleCamCode\tests\conftest.pysim_envr      s     5 I& H,,,,c)nn===13xBY7Y3Z3Z[[[)3x:V/V+W+WXXX-s8l3J/K/KLLL yhOOO    namec                     t           dz  |  dz  }t          j                            | |          }t          j                            |          }|j                            |           |S )zImport one of opt/bubblecam/bin/*.py by path (they're entry-point
    scripts, not a package, so they aren't importable via `import` directly).binz.py)BUBBLECAM_LIB	importlibutilspec_from_file_locationmodule_from_specloaderexec_module)r   pathspecmodules       r   load_bin_moduler%       s`     5 d<<</D>11$==D^,,T22FKF###Mr   )builtins@py_builtins_pytest.assertion.rewrite	assertionrewrite
@pytest_arimportlib.utilr   syspathlibr   pytest__file__resolveparent	REPO_ROOTr   r   r"   insertfixturer   r%    r   r   <module>r7      s                      



       DNN""$$+2	E!K/3}SX%%HOOAss=))*** P P P"#      r   