Skip to content

Commit

Permalink
chore: nox doctests only in Python 3.12 (#1222)
Browse files Browse the repository at this point in the history
* only doctest in 3.12 in nox

* skip writing file in doctests
  • Loading branch information
EdAbati authored Oct 19, 2024
1 parent 73829c0 commit 59aa483
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions narwhals/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,9 +582,9 @@ def write_parquet(self, file: str | Path | BytesIO) -> Any:
We can then pass either pandas, Polars or PyArrow to `func`:
>>> func(df_pd)
>>> func(df_pl)
>>> func(df_pa)
>>> func(df_pd) # doctest:+SKIP
>>> func(df_pl) # doctest:+SKIP
>>> func(df_pa) # doctest:+SKIP
"""
self._compliant_frame.write_parquet(file)

Expand Down
4 changes: 3 additions & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ def run_common(session: Session, coverage_threshold: float) -> None:
f"--cov-fail-under={coverage_threshold}",
"--runslow",
)
session.run("pytest", "narwhals", "--doctest-modules")

if session.python == "3.12":
session.run("pytest", "narwhals", "--doctest-modules")


@nox.session(python=PYTHON_VERSIONS) # type: ignore[misc]
Expand Down

0 comments on commit 59aa483

Please sign in to comment.