No public results yet
Plan an incremental library migration with rollback checkpoints
Break a dependency replacement into reviewable stages with compatibility checks, exit criteria and realistic rollback limits.
Build focused tests for normal behavior, boundaries, failures, and state changes while matching the project's framework and conventions.
No public result for version 1 yet
Version 1 · 4 variables · 4 required
Fill in the values below — the customized prompt updates as you type. marks a required value.
Language, test runner, and known module path. Default: Python 3.12 with pytest; the target is in shipping.py.
Observable behavior, valid inputs, boundary rules, and expected errors. Default: shipping_cost(subtotal) accepts a non-negative numeric subtotal. Shipping is 4.99 below 50 and 0 at or above 50. Negative subtotals raise ValueError.
The function or component to test. Default: def shipping_cost(subtotal): if subtotal < 0: raise ValueError('subtotal must be non-negative') return 0 if subtotal >= 50 else 4.99
Existing examples or naming, fixture, and assertion conventions. Default: Use pytest functions named test_<behavior>; parameterize similar boundary cases; use pytest.raises for exceptions.
Generate unit tests for the following target.
Language and test framework:
Python 3.12 with pytest; the target is in shipping.py.
Behavior contract:
shipping_cost(subtotal) accepts a non-negative numeric subtotal. Shipping is 4.99 below 50 and 0 at or above 50. Negative subtotals raise ValueError.
Implementation:
def shipping_cost(subtotal):
if subtotal < 0:
raise ValueError('subtotal must be non-negative')
return 0 if subtotal >= 50 else 4.99
Existing test conventions or examples:
Use pytest functions named test_<behavior>; parameterize similar boundary cases; use pytest.raises for exceptions.
First map the public behaviors in the contract to a compact list of cases: a normal input, meaningful boundaries, invalid inputs, and state or error behavior where relevant. Distinguish required behavior from behavior merely observed in the implementation. Flag a contract conflict instead of silently making tests preserve a bug.
Then provide complete test-file content using the supplied framework and existing naming, setup, and assertion style. Use specific inputs and expected outputs that are derived from the contract. Each test should fail for a meaningful behavior regression; avoid tests that repeat the implementation's calculation or only assert that a mock was called.
Keep tests deterministic and isolated. Stub only external boundaries needed for the unit under test; reset state and clean up resources. Do not add network calls, real delays, or production service dependencies. If imports or project paths are unknown, label the required substitutions rather than inventing project structure.
Finish with the command to run this focused suite, any assumptions, and a short list of integration risks the unit tests cannot cover. Do not claim the tests ran or quote coverage percentages without actual execution evidence.No public examples yet for version 1
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Curated prompt only. No example output or model test is attached; model compatibility has not been verified. Default inputs are illustrative practice material; replace them with your own facts and context.
Reports go to moderators and are never shown publicly.
No public results yet
Break a dependency replacement into reviewable stages with compatibility checks, exit criteria and realistic rollback limits.
No public results yet
Define realistic traffic, workload data, measurements and stopping rules for an authorized performance test.
No public results yet
Find source-visible labeling, semantics and keyboard risks, while separating code findings from checks that require a browser.
No public results yet
Map feature assets, trust boundaries and data flows to concrete threats, existing controls and targeted verification tasks.
No public results yet
Turn an API contract into a small client design that handles retryable failures, deadlines and idempotency deliberately.
No public results yet
Interpret supplied plan evidence and prioritize query or index experiments without inventing costs or speedups.
Oldest first · one level of replies
Sign in to join the discussion. Share what you learned or made with this prompt.
No comments yet
Be the first to share how this prompt worked for you.