
    KiR                     4    S SK r S SKrS SKJr  S SKrS rS rg)    N)dedentc                    U R                  S5      nUR                  [        S5      5        [        R                  " [
        R                  5       n[
        R                  " [        R                  [        U5      /[
        R                  S9  S S S 5        WR                  R                  nSU;   d   eSU;   d   eSU;   d   eSU;   d   eg ! , (       d  f       NE= f)Napp.pyz
    from posthog import Posthog
    posthog = Posthog('phc_x', host='https://eu.i.posthog.com', enable_exception_autocapture=True, debug=True, on_error=lambda e, batch: print('error handling batch: ', e, batch))

    # frame_value = "LOL"

    1/0
    stderr   ZeroDivisionError   LOL(   DEBUG:posthog:data uploaded successfully   "$exception_list": [{"mechanism": {"type": "generic", "handled": true}, "module": null, "type": "ZeroDivisionError", "value": "division by zero", "stacktrace": {"frames": [{"platform": "python", "filename": "app.py", "abs_path"joinwriter   pytestraises
subprocessCalledProcessErrorcheck_outputsys
executablestrSTDOUTvalueoutputtmpdirappexcinfor   s       e/var/www/html/dynamic-report/venv/lib/python3.13/site-packages/posthog/test/test_exception_capture.pytest_excepthookr          
++h
CII		
 
z44	5S ::CTCTU 
6 ]]!!F6)))V6&@@@ 	o		 
6	5   =C
Cc                    U R                  S5      nUR                  [        S5      5        [        R                  " [
        R                  5       n[
        R                  " [        R                  [        U5      /[
        R                  S9  S S S 5        WR                  R                  nSU;   d   eSU;   d   eSU;   d   eSU;   d   eg ! , (       d  f       NE= f)Nr   aE  
    from posthog import Posthog, Integrations
    posthog = Posthog('phc_x', host='https://eu.i.posthog.com', enable_exception_autocapture=True, exception_autocapture_integrations=[Integrations.Django], debug=True, on_error=lambda e, batch: print('error handling batch: ', e, batch))

    # frame_value = "LOL"

    1/0
    r   r   r	   r
   r   r   r   s       r   %test_trying_to_use_django_integrationr#   %   r    r!   )r   r   textwrapr   r   r   r#        r   <module>r'      s     
  :r&   