diff --git a/py-polars/tests/unit/test_polars_import.py b/py-polars/tests/unit/test_polars_import.py index 51beee946e93..0b5d794e93d3 100644 --- a/py-polars/tests/unit/test_polars_import.py +++ b/py-polars/tests/unit/test_polars_import.py @@ -16,7 +16,7 @@ MAX_ALLOWED_IMPORT_TIME = 200_000 # << microseconds -def _import_time_from_frame(tm: pl.DataFrame) -> int: +def _import_time_from_frame(tm: pl.DataFrame) -> int: # pragma: no cover return int( tm.filter(pl.col("import").str.strip_chars() == "polars") .select("cumulative_time") @@ -24,7 +24,7 @@ def _import_time_from_frame(tm: pl.DataFrame) -> int: ) -def _import_timings() -> bytes: +def _import_timings() -> bytes: # pragma: no cover # assemble suitable command to get polars module import timing; # run in a separate process to ensure clean timing results. cmd = f'{sys.executable} -X importtime -c "import polars"' @@ -35,7 +35,9 @@ def _import_timings() -> bytes: ) -def _import_timings_as_frame(n_tries: int) -> tuple[pl.DataFrame, int]: +def _import_timings_as_frame( # pragma: no cover + n_tries: int, +) -> tuple[pl.DataFrame, int]: import_timings = [] for _ in range(n_tries): df_import = ( @@ -68,7 +70,7 @@ def _import_timings_as_frame(n_tries: int) -> tuple[pl.DataFrame, int]: @pytest.mark.skipif(sys.platform == "win32", reason="Unreliable on Windows") @pytest.mark.slow() -def test_polars_import() -> None: +def test_polars_import() -> None: # pragma: no cover # up-front compile '.py' -> '.pyc' before timing polars_path = Path(pl.__file__).parent compileall.compile_dir(polars_path, quiet=1)