v0.150.0
Release plain-esbuild 0.11.0
5083aa2
·
18h ago
plain-pytest changelog
0.19.0 (2026-05-21)
What's changed
- The plugin now sets
PLAIN_ENV=test in pytest_configure so the dotenv loader picks the right files even when pytest is invoked directly (without plain test). Under PLAIN_ENV=test, the new precedence ladder skips .env.local to keep CI runs deterministic. (9932738450)
- Dotenv loading delegates to
plain.dev.dotenv.load_dotenv_files() instead of the old direct load_dotenv(".env.test", override=True) call. plain.pytest opportunistically imports the loader — if plain.dev is installed, the full .env.test.local → .env.test → .env ladder loads (first-wins, override=False); if not, dotenv loading is silently skipped. (9932738450)
Upgrade instructions
- If your CI relied on
.env.test overriding values exported in the environment (the old loader used override=True), the new behavior is first-wins — exported env vars now take precedence over .env.test. Either drop the conflicting export from CI, or override values in CI directly.
- If you ran
pytest directly in a project without plain.dev installed and depended on .env.test being read, install plain.dev (as a dev dep) or load .env.test yourself before invoking pytest.
0.18.1 (2026-05-05)
What's changed
- Exposes
__version__ from importlib.metadata on plain.pytest for version probes that don't want to scrape pip metadata. (c6cf6edb)
Upgrade instructions
0.18.0 (2026-04-27)
What's changed
- Added
otel_spans and otel_metrics fixtures. Both wrap the new plain.test.otel helpers, drain prior state on entry, and return an InMemorySpanExporter / InMemorySpanReader. Use otel_spans.get_finished_spans() to read spans emitted during the test, or otel_metrics.get_metrics_data() / .collect() to read metrics. Safe to use both in the same test — they share the global tracer/meter providers. (e650b556447f)
- Added
opentelemetry-sdk>=1.34.1 as a dependency to back the new fixtures, and bumped the plain minimum to >=0.137.0 (which ships plain.test.otel).
Upgrade instructions
0.17.1 (2026-03-18)
What's changed
- Removed incorrect
conftest.py import instructions from docs — the settings and testbrowser fixtures are automatically available (c399f3dcfd3c)
Upgrade instructions
0.17.0 (2026-03-12)
What's changed
- Updated imports from
plain.models to plain.postgres in the pytest plugin and README.
Upgrade instructions
- Update imports:
from plain.models to from plain.postgres, from plain import models to from plain import postgres.
0.16.7 (2026-03-10)
What's changed
- Adopted PEP 695
Generator syntax in fixture type annotations (aa5b2db6e8ed)
Upgrade instructions
0.16.6 (2026-03-09)
What's changed
- Updated test browser fixture to use
get_connection() instead of the removed db_connection proxy (4a79279d01dd)
Upgrade instructions
0.16.5 (2026-03-08)
What's changed
- Removed
--log-level flag from the browser test server command, which was removed from the server CLI in plain 0.113.0 and caused browser tests to fail (965682477739)
Upgrade instructions
0.16.4 (2026-02-26)
What's changed
- Auto-formatted config files with updated linter configuration (028bb95c3ae3)
Upgrade instructions
0.16.3 (2026-02-24)
What's changed
- Fixed flaky Playwright tests caused by a race condition in test server startup. The fixed 700ms sleep is replaced with an active connection check that polls until the server is actually accepting connections, with a 10s timeout and early failure detection if the server process crashes (d87c7d868eb7)
Upgrade instructions
0.16.2 (2026-02-04)
What's changed
- Moved
.env.test loading from the CLI command to the pytest plugin, ensuring environment variables are loaded even when running pytest directly without the plain test wrapper (9c7100bd4ec9)
- The CLI now uses
os.execvp() to replace the process with pytest instead of spawning a subprocess, improving signal handling and process management (9c7100bd4ec9)
Upgrade instructions
0.16.1 (2026-01-28)
What's changed
- Converted the
plain-test skill to a passive .claude/rules/ file (512040ac51)
Upgrade instructions
- Run
plain agent install to update your .claude/ directory.
0.16.0 (2026-01-15)
What's changed
- Replaced
python-dotenv dependency with Plain's built-in dotenv parser, which supports bash-compatible features like variable expansion, command substitution, and backslash escapes (a9b2dc3e)
Upgrade instructions
0.15.0 (2026-01-13)
What's changed
- Expanded README documentation with more examples and a FAQs section (da37a78f)
Upgrade instructions
0.14.0 (2026-01-13)
What's changed
- Added a
plain-test skill to help AI coding assistants run and understand tests (b592c32c)
Upgrade instructions
0.13.2 (2025-11-17)
What's changed
- No functional code changes. This release only updates internal tooling and documentation.
Upgrade instructions
0.13.1 (2025-11-03)
What's changed
- The
plain test command is now marked as a "common command" to show it in the default CLI help output (73d3a48f)
- Updated the
plain test command description to "Test suite with pytest" for clarity (fdb9e801)
Upgrade instructions
0.13.0 (2025-10-17)
What's changed
- The
testbrowser now uses plain server instead of gunicorn to run the test server process (51461b99)
Upgrade instructions
- Remove
gunicorn from your project dependencies if it was only being used for the testbrowser fixture
0.12.2 (2025-10-06)
What's changed
- Added comprehensive type annotations to all public methods and functions (c87ca27e)
Upgrade instructions
0.12.1 (2025-09-25)
What's changed
- The CLI output when loading
.env.test is now dimmed and italicized for a cleaner test output (6166ab78)
Upgrade instructions
0.12.0 (2025-09-22)
What's changed
- Removed automatic addition of "testserver" to
ALLOWED_HOSTS during pytest runs, as Plain now defaults ALLOWED_HOSTS to an empty list with better host validation (d3cb7712)
Upgrade instructions
0.11.0 (2025-09-19)
What's changed
- Minimum Python version increased to 3.13 (d86e307e)
- Color output is now properly disabled during pytest runs to prevent formatting issues (88f1bac6)
Upgrade instructions
- Upgrade your Python environment to 3.13 or later
0.10.1 (2025-07-30)
What's changed
TestBrowser.discover_urls now handles query-parameter-only URLs (e.g., "?stage=approved") by resolving them relative to the current page path (4651a7b)
Upgrade instructions
0.10.0 (2025-06-27)
What's changed
TestBrowser.discover_urls now accepts one argument: a list of URL strings. Previously it accepted a variable number of positional arguments. This provides clearer typing and usage (3d56b1f).
Upgrade instructions
- Wrap the URLs you pass to
testbrowser.discover_urls in a list. For example, change testbrowser.discover_urls("/", "/about/") to testbrowser.discover_urls(["/", "/about/"]).
0.9.1 (2025-06-26)
What's changed
- No functional code changes. This release only updates internal tooling and documentation.
Upgrade instructions
0.9.0 (2025-06-23)
What's changed
testbrowser fixture now derives the database URL from plain.models.db_connection, aligning with Plain's new single DATABASE setting and removing the dependency on DEFAULT_DB_ALIAS/connections (d346d81).
Upgrade instructions
- Upgrade your project to
plain>=0.50.0 (which introduces the single DATABASE setting). No other changes required.