{"categories":[{"label":"Testing","url":"https://skillfed.io/packages/category/software-development-testing/2"}],"enrichment":{"capability":"expecttest implements inline golden tests where expected outputs are stored directly in Python source code and automatically updated when you run tests with EXPECTTEST_ACCEPT=1.","skillfed_tags":["snapshot-testing","test-automation"],"use_cases":["Verify formatted output of code generators or transpilers by capturing and versioning the generated code inline.","Test error messages and exception formatting by accepting the actual output as the expected baseline.","Snapshot test complex data structure representations without maintaining separate snapshot files.","Validate multi-line string output in documentation examples or report generation.","Update test expectations in bulk when intentional API changes produce different but correct output."],"what_it_does":"expecttest is a testing library that implements golden tests with inline expectations\u2014a pattern where you write tests with blank expected-output placeholders, run them to capture actual output, then rerun with EXPECTTEST_ACCEPT=1 to automatically populate the source code with the captured values. It works with both unittest and pytest, and supports multiline strings via triple-quoted literals.\n\nThe library modifies your Python test files directly when accepting new expectations, rather than storing them in external snapshot files. This keeps test logic and expectations in one place but requires careful version control practices. It's useful when you want to verify complex output (formatted strings, error messages, data structures) without manually writing expected values.","worth_installing":"Yes, if you prefer inline snapshots over external snapshot files and your team is comfortable with test files being modified during test runs. The library is stable, permissively licensed, and has no dependencies. The aging maintenance status is not a blocker for a mature, focused tool, but verify it still works smoothly with your pytest or unittest version before adopting it in a new project."},"id":"expecttest","links":{"html":"https://skillfed.io/packages/expecttest","md":"https://skillfed.io/packages/expecttest.md","pypi":"https://pypi.org/project/expecttest/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2024-12-11","license_spdx":null,"license_treatment":"permissive","name":"expecttest","python_support":"supports_current","summary":null},"popularity":{"monthly_downloads":2333091,"position":3130,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"0.3.0"}
