Skip to content

Commit

Permalink
test: git rid of root folder
Browse files Browse the repository at this point in the history
  • Loading branch information
reata committed Dec 31, 2023
1 parent 1fa5deb commit 0506489
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/core/test_metadata_provider.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
import os

import pytest

from sqllineage.core.metadata.sqlalchemy import SQLAlchemyMetaDataProvider
from sqllineage.exceptions import MetaDataProviderException


def test_sqlalchemy_metadata_provider_connection_fail():
# connect to /root directory as sqlite db, which is not possible. Simulate connection failure
# connect to a directory as sqlite db, which is not possible. Simulate connection failure
with pytest.raises(MetaDataProviderException):
SQLAlchemyMetaDataProvider("sqlite:////root/")
SQLAlchemyMetaDataProvider(f"sqlite:///{os.path.dirname(__file__)}")


def test_sqlalchemy_metadata_provider_driver_not_install():
# use an unknown driver to connect. Simulate driver not installed
with pytest.raises(MetaDataProviderException):
SQLAlchemyMetaDataProvider("sqlite+unknown_driver:///:memory:")
Expand Down

0 comments on commit 0506489

Please sign in to comment.