-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add deprecation warning for db2 module
- Loading branch information
Showing
3 changed files
with
41 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
class PyexasolWarning(UserWarning): | ||
"""Base class for all warnings emited by pyexasol.""" | ||
|
||
|
||
class PyexasolDeprecationWarning(PyexasolWarning, 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,7 @@ | ||
import pytest | ||
from pyexasol.warnings import PyexasolDeprecationWarning | ||
|
||
|
||
def test_import_db2_module_emits_deprecation_warning(): | ||
with pytest.warns(PyexasolDeprecationWarning): | ||
from pyexasol import db2 |