-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #287 from DoubleML/s-fix-rdrobust-test
Update Importerror for conda testing
- Loading branch information
Showing
7 changed files
with
19 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
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 |
---|---|---|
@@ -1,11 +1,12 @@ | ||
import pytest | ||
from unittest.mock import patch | ||
|
||
from doubleml.rdd._utils import _is_rdrobust_available | ||
import doubleml as dml | ||
|
||
|
||
@pytest.mark.ci | ||
def test_rdrobust_import_error(): | ||
with patch('importlib.import_module', side_effect=ImportError): | ||
with patch('doubleml.rdd.rdd.rdrobust', None): | ||
msg = r"rdrobust is not installed. Please install it using 'pip install DoubleML\[rdd\]'" | ||
with pytest.raises(ImportError, match=msg): | ||
_is_rdrobust_available() | ||
dml.rdd.RDFlex(None, None) |
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