Skip to main content

Unittest functions isolated.

Project description

FunAlone

A small python library that makes it easy to test a function alone, that is, mocking all dependencies. True unittests, without having to manually look and add every called function to an increasing list of @mock.patch decorators.

Changelog

0.5.0

  • Separated functionality into two different files.
  • Functions can now keep original globals and only override certain ones.
  • Functions can now keep default arguments.
  • Kept globals can be specified with a list of strings.
  • Reworked how mocks are created and stored.
  • Mocks can now be created and modified like attributes in the collection.
  • Minor fixes

0.4.0

  • Changed from a function decorator to a context manager for versatility.
  • Made dependency logging optional

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

funalone-0.5.0.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

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

funalone-0.5.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file funalone-0.5.0.tar.gz.

File metadata

  • Download URL: funalone-0.5.0.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for funalone-0.5.0.tar.gz
Algorithm Hash digest
SHA256 77c8f14ee0a4f1e51b4e1289cf6b7e615a390a760afcd94a8b3578c1aa111d8e
MD5 277ce5b886432ff1a9abe5d514d79c3e
BLAKE2b-256 d6d0b6aa757a6cb208ba5cdcc1d466b01a0792fd5f4f3bc3b533af8710c02405

See more details on using hashes here.

Provenance

The following attestation bundles were made for funalone-0.5.0.tar.gz:

Publisher: publish.yml on aafrecct/funalone

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

File details

Details for the file funalone-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: funalone-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for funalone-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 176cf6beb44ef73786777cf3573e3b9eba069518b154d90ac32444ee103eb8f3
MD5 e7a9e1c35b3d30d0646978ff98517db2
BLAKE2b-256 7d800ff9ab947028a429d86f9201aba0821095c3791931ba5caaca343ec04994

See more details on using hashes here.

Provenance

The following attestation bundles were made for funalone-0.5.0-py3-none-any.whl:

Publisher: publish.yml on aafrecct/funalone

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