:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore(tests): drop stale ee/pytest.ini (#70521)
Raúl Negrón-Oterob864e6babaa3
diff --git a/conftest.py b/conftest.pyindex 4bf8b74dd8c9..f1783a0613dd 100644--- a/conftest.py+++ b/conftest.py@@ -11,7 +11,7 @@ import pytest# enabled as usual. The window normally opens even earlier, in the pytest_boot_gc# plugin (`-p pytest_boot_gc` in pytest.ini), so that django.setup() (which# pytest-django runs before conftest files load) sits inside it too; the disable-# here is the fallback for runs that don't load that plugin (e.g. ee/pytest.ini).+# here is the fallback for runs that don't load that plugin.gc.disable()diff --git a/docs/internal/django-startup-time.md b/docs/internal/django-startup-time.mdindex d0c630625936..6ca04381682b 100644--- a/docs/internal/django-startup-time.md+++ b/docs/internal/django-startup-time.md@@ -48,7 +48,7 @@ There is deliberately no `gc.collect()` before the freeze: a full pass over theThe window must always close — GC left disabled in a long-lived process means unbounded cycle growth — hence the `try`/`finally` and the guard test asserting `gc.isenabled()` and a nonzero freeze count after a `manage.py` boot.Pytest processes get the same window via a dedicated early-loaded plugin, `pytest_boot_gc.py`, registered with `-p pytest_boot_gc` in `pytest.ini`.`-p` plugins load before pytest-django's `load_initial_conftests` hook, which is what runs `django.setup()`, so the disable is already in effect when setup's several million permanent allocations happen.-The root conftest still closes the window (freeze, re-enable, threshold tuning) via `_end_gc_boot_window` at collection finish; its own `gc.disable()` call stays as a fallback for test configs that do not load the plugin (e.g. `ee/pytest.ini`).+The root conftest still closes the window (freeze, re-enable, threshold tuning) via `_end_gc_boot_window` at collection finish; its own `gc.disable()` call stays as a fallback for test configs that do not load the plugin.This saves ~0.2–0.4s per test process.Celery's `django.setup()` happens inside its Django fixup, not in an entrypoint we own, so celery workers do not get the window yet.diff --git a/ee/pytest.ini b/ee/pytest.inideleted file mode 100644index 0fac6f21f509..000000000000--- a/ee/pytest.ini+++ /dev/null@@ -1,13 +0,0 @@-[pytest]-env =- DEBUG=1- TEST=1-DJANGO_SETTINGS_MODULE = posthog.settings-addopts = -p no:warnings --reuse-db--markers =- ee- clickhouse_only- skip_on_multitenancy--asyncio_mode = autodiff --git a/posthog/conftest.py b/posthog/conftest.pyindex ff431c6cb196..84a5a5decb5d 100644--- a/posthog/conftest.py+++ b/posthog/conftest.py@@ -11,7 +11,7 @@ from posthog.test.base import PostHogTestCase, run_clickhouse_statement_in_paraltry:from hogli_commands.quarantine.pytest_support import apply_quarantine_markers-except ImportError: # fail-open: runs without tools/hogli-commands on pythonpath (e.g. ee/pytest.ini)+except ImportError: # fail-open: runs without tools/hogli-commands on pythonpathapply_quarantine_markers = Nonefrom django.conf import settings