Skip to content

Commit

Permalink
Create test_rdd_not_installed.py
Browse files Browse the repository at this point in the history
  • Loading branch information
SvenKlaassen committed Jan 8, 2025
1 parent bcf62c2 commit ad4b6c8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions doubleml/rdd/tests/test_rdd_not_installed.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import pytest
from unittest.mock import patch


@pytest.mark.ci
def test_rdrobust_import_error():
with patch('doubleml.rdd.rdd._rdrobust_available', False):
msg = r"rdrobust is not installed. Please install it using 'pip install DoubleML\[rdd\]'"
with pytest.raises(ImportError, match=msg):
from doubleml.rdd import RDFlex
RDFlex(None, None)

0 comments on commit ad4b6c8

Please sign in to comment.