If I have a test file with
import pytest
import narwhals as nw
@nw.narwhalify
def f(df):
return df.with_columns(d=nw.col('d')*2)
@pytest.mark.parametrize("lib", ["pandas", "polars"])
def test_select_cols(lib):
lib = pytest.importorskip(lib)
df = nw.from_native(lib.DataFrame({"a": [1, 2], "b": [10, 20], "c": ["x", "y"]}))
result = df.with_columns(d=nw.col('a')+1)
assert result.columns == ['a', 'b', 'c', 'd']
then I can execute it with pytest test_me.py
How can I run pytest so that it uses fireducks instead of pandas? I tried
$ python -m fireducks.pandas pytest test_me.py
usage: fireducks.importhook [-h] [-m mod] [--delimiter CHAR] [--hook-import-module] [-q] [-v] [--suppress-logs] hook [hook ...] [--] prog [arg ...]
fireducks.importhook: error: invalid hooks: 'fireducks.pandas pytest'
but that fails
If I have a test file with
then I can execute it with
pytest test_me.pyHow can I run
pytestso that it uses fireducks instead of pandas? I triedbut that fails