-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add deprectaion warnings for trubodbc and pyodbc (#441)
- Loading branch information
Showing
6 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
class SqlaExasolWarning(UserWarning): | ||
"""Base class for all warnings emited by sqlalchemy_exasol.""" | ||
|
||
|
||
class SqlaExasolDeprecationWarning(SqlaExasolWarning, DeprecationWarning): | ||
"""Warning class for features that will be removed in future versions.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import pytest | ||
|
||
from sqlalchemy_exasol.pyodbc import EXADialect_pyodbc | ||
from sqlalchemy_exasol.turbodbc import EXADialect_turbodbc | ||
|
||
|
||
@pytest.mark.parametrize( | ||
"klass,kwargs", [(EXADialect_pyodbc, {}), (EXADialect_turbodbc, {})] | ||
) | ||
def test_deprectation_warnings(klass, kwargs): | ||
with pytest.deprecated_call(): | ||
_ = EXADialect_pyodbc(**kwargs) |