Environment methods
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -2,7 +2,7 @@ import os
|
||||
from typing import Dict, Optional, Any, TypedDict, List
|
||||
from supabase import create_client, Client
|
||||
from supabase.lib.client_options import SyncClientOptions
|
||||
from gotrue import SyncMemoryStorage
|
||||
from supabase_auth import SyncMemoryStorage
|
||||
from modules.logger_tool import initialise_logger
|
||||
|
||||
logger = initialise_logger(__name__, os.getenv("LOG_LEVEL"), os.getenv("LOG_PATH"), 'default', True)
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+21
-12
@@ -2,7 +2,11 @@ import os
|
||||
import sys
|
||||
import logging
|
||||
import datetime
|
||||
import pytest
|
||||
try:
|
||||
import pytest
|
||||
PYTEST_AVAILABLE = True
|
||||
except ImportError:
|
||||
PYTEST_AVAILABLE = False
|
||||
from dotenv import load_dotenv, find_dotenv
|
||||
|
||||
# Load environment variables
|
||||
@@ -86,17 +90,22 @@ class FileFormatter(logging.Formatter):
|
||||
return logging.Formatter(LOG_FORMAT).format(record)
|
||||
|
||||
class PytestFormatter:
|
||||
@pytest.hookimpl(hookwrapper=True)
|
||||
def pytest_runtest_makereport(self, item, call):
|
||||
outcome = yield
|
||||
report = outcome.get_result()
|
||||
if report.when == "call":
|
||||
if report.passed:
|
||||
logging.success(f"✅ Test passed: {item.name}")
|
||||
elif report.failed:
|
||||
logging.error(f"❌ Test failed: {item.name}")
|
||||
elif report.skipped:
|
||||
logging.warning(f"⏭️ Test skipped: {item.name}")
|
||||
if PYTEST_AVAILABLE:
|
||||
@pytest.hookimpl(hookwrapper=True)
|
||||
def pytest_runtest_makereport(self, item, call):
|
||||
outcome = yield
|
||||
report = outcome.get_result()
|
||||
if report.when == "call":
|
||||
if report.passed:
|
||||
logging.success(f"✅ Test passed: {item.name}")
|
||||
elif report.failed:
|
||||
logging.error(f"❌ Test failed: {item.name}")
|
||||
elif report.skipped:
|
||||
logging.warning(f"⏭️ Test skipped: {item.name}")
|
||||
else:
|
||||
# Dummy implementation when pytest is not available
|
||||
def pytest_runtest_makereport(self, item, call):
|
||||
pass
|
||||
|
||||
# Custom logger methods
|
||||
def _add_custom_log_methods():
|
||||
|
||||
Reference in New Issue
Block a user