Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

attempt: try to deflake windows pytest (#7795)

Dylan Madisetti1a91331428c3
diff --git a/tests/_runtime/test_pytest_runtime.py b/tests/_runtime/test_pytest_runtime.py
index 5353471a7b..88e15481c1 100644
--- a/tests/_runtime/test_pytest_runtime.py
+++ b/tests/_runtime/test_pytest_runtime.py
@@ -1,12 +1,9 @@
import os
from pathlib import Path
-from marimo._runtime.pytest import run_pytest
-
-pytest_plugins = ["pytester"]
-
def test_smoke_test():
+ from marimo._runtime.pytest import run_pytest
from tests._runtime.script_data.contains_tests import app
_, lcls = app.run()
diff --git a/tests/conftest.py b/tests/conftest.py
index 6e41b4c552..27358cb953 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -656,10 +656,11 @@ class TestableModuleStub(ModuleStub):
# ./test_pytest_scoped
@pytest.hookimpl
def pytest_make_collect_report(collector):
- report = runner.pytest_make_collect_report(collector)
- # If it's not a module, we can return early.
+ # If it's not a module, we must early.
if not isinstance(collector, pytest.Module):
- return report
+ return None
+
+ report = runner.pytest_make_collect_report(collector)
# Defined within the file does not seem to hook correctly, as such filter
# for the test_pytest specific file here.