Skip to content

Commit da9ae33

Browse files
committed
Add debugging code
1 parent 2d9c77a commit da9ae33

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

sqlalchemy_singlestoredb/tests/conftest.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,6 @@ def base_connection_url(_docker_server: Optional[Any]) -> str:
113113
# First check environment variable
114114
url = os.environ.get('SINGLESTOREDB_URL', '').strip()
115115
if url:
116-
import base64
117-
raise Exception(
118-
f'Using SINGLESTOREDB_URL from environment: '
119-
f'{base64.b64encode(url.encode("utf-8"))!r}',
120-
)
121116
return ensure_standard_url(url)
122117

123118
# If no env var, use Docker server if available
@@ -240,13 +235,9 @@ def test_database(base_connection_url: str) -> Generator[str, None, None]:
240235
else:
241236
print(f'Using existing database from connection URL: {db_name}')
242237

243-
engine.dispose()
244-
245238
# Yield the database name for all tests to use
246239
yield db_name
247240

248-
engine = create_engine(db_connection_url)
249-
250241
# Cleanup: Drop the test database at the end of the session
251242
if not has_database:
252243
print(f'Cleaning up shared test database: {db_name}')
@@ -269,8 +260,9 @@ def test_engine(
269260
if query:
270261
test_url += f'?{query}'
271262

272-
raise Exception(f'Using engine URL: {test_url}')
263+
print(f'Using engine URL: {test_url}')
273264
engine = create_engine(test_url)
265+
print(f'Using engine URL: {engine.url.render_as_string(hide_password=False)}')
274266

275267
yield engine
276268

0 commit comments

Comments
 (0)