Skip to main content

Add your description here

Project description

Quack Test

A plugin for pytest to evaluate non-deterministic agent components.

Installation

Simply pip install it

pip install quack-test

Usage

You can simply specify @nondeterministic for components, which are not deterministic and should be run multiple times.

import random
from quack_test import nondeterministic_fixture, nondeterministic_test, judge

@nondeterministic_fixture(n=5)
def sample_text():
    return f"I have {random.randint(10)} apples."

@nondeterministic_test(score=0.8)
def test_apples(sample_text):
    return judge(sample_text, criterion="Has more than 1 apple")

@nondeterministic_test(score=0.8)
def test_coal(sample_text):
    return judge(sample_text, criterion="Has only coal")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quack_test-0.1.0.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

quack_test-0.1.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file quack_test-0.1.0.tar.gz.

File metadata

  • Download URL: quack_test-0.1.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for quack_test-0.1.0.tar.gz
Algorithm Hash digest
SHA256 00687516d564f5968c4fd5a7add7f842bf36b651b200cc11076b10238f5032f8
MD5 23cb884d7c65090ba17e2a91a2d6bba8
BLAKE2b-256 0a93e839927240f39c1fc781a35a5ce61fe4ba4bf4ca7ebe4821dfcce511aa99

See more details on using hashes here.

Provenance

The following attestation bundles were made for quack_test-0.1.0.tar.gz:

Publisher: python-publish.yml on penguinmenac3/quack-test

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file quack_test-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: quack_test-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for quack_test-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9c86429abe6cec8aecf7eabb1365f771e2b30d460684bfa928fa357293b401c4
MD5 c54e53f7386f8f94a1942a4adc69f388
BLAKE2b-256 3783ffa05d6ac3d65342dd83af2ed02f51b0275101c4a8534ab8a3bcf386801e

See more details on using hashes here.

Provenance

The following attestation bundles were made for quack_test-0.1.0-py3-none-any.whl:

Publisher: python-publish.yml on penguinmenac3/quack-test

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page