What do we need to lie about?
&
Where do we need to lie about it?
Test passed with 1 success 🎉.
Test passed with 1 success 🎉.
@pytest.mark.parametrize(
"library, tbl_type",
[("Polars", "polars"), ("Pandas", "pandas"), ("Ibis", "duckdb")],
)
def test_get_dataframe_report_missing_libraries(library, tbl_type):
validation = Validate(data="small_table")
with patch("pointblank.validate._is_lib_present") as mock_is_lib:
mock_is_lib.return_value = False # library not present
with pytest.raises(
ImportError, match=f"The {library} library is not installed"
):
validation.get_dataframe_report(tbl_type)
&
Where do we need to lie about it?
How do we keep the lie going?
{withr}{withr} for environmental control• Safely and temporarily modify environment
• Manage side effects in your code
• When it’s environmental, start here