Skip to main content

A custom python codec that provides an RSpec style dsl for python

Project description

This is a project creates a custom Python codec that lets the developer write their tests using an RSpec inspired DSL (i.e. describe and it blocks).

It uses the fact that python allows the registration of a codec that can be used to read in source code and modify it at import time.

NoseOfYeti uses this technique to find files with a particular coding declaration on the first line of a file to turn the rspec inspired DSL into ordinary python that is then executed as if it were written like that in the first place.

The original idea comes from @fmeyer who wrote this blog post and a simple proof of concept before it was picked up and worked on by @hltbra in this repo.

@delfick discovered this work in 2010 and over the following decade plus has improved on the concept, giving it more features and integration with python tooling.

The documentation can be found at http://noseofyeti.readthedocs.io and the code over at https://github.com/delfick/nose-of-yeti.

Updating nose-of-yeti version

It is recommended any .pyc files are removed when NoseOfYeti is upgraded.

The Python interpreter skips the translation process if it sees a .pyc file (unless the .py file has changed since the .pyc file was created). This means that any changes in the translation process won’t apply until either the .pyc files are removed or all the .py files have been changed.

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

noseofyeti-2.4.9.tar.gz (35.9 kB view details)

Uploaded Source

Built Distribution

noseofyeti-2.4.9-py3-none-any.whl (27.6 kB view details)

Uploaded Python 3

File details

Details for the file noseofyeti-2.4.9.tar.gz.

File metadata

  • Download URL: noseofyeti-2.4.9.tar.gz
  • Upload date:
  • Size: 35.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.8.19

File hashes

Hashes for noseofyeti-2.4.9.tar.gz
Algorithm Hash digest
SHA256 74a5a695a48f18595723a3d61f71c480168f63b45adb7b9e390b6ee00f552624
MD5 6499eec96e54ffc83c35d4f82047ef27
BLAKE2b-256 1abd683696c7c03df1dc94fb47739bfbc96a23f8bfac089dbfebe6c38fcbac67

See more details on using hashes here.

File details

Details for the file noseofyeti-2.4.9-py3-none-any.whl.

File metadata

  • Download URL: noseofyeti-2.4.9-py3-none-any.whl
  • Upload date:
  • Size: 27.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.8.19

File hashes

Hashes for noseofyeti-2.4.9-py3-none-any.whl
Algorithm Hash digest
SHA256 dfdc952253c5368dd3f307b4a400642f1e18368c10b5417295945dded5f31c30
MD5 eb16aefb1821c131b3cfeea86bc27f41
BLAKE2b-256 0f49f18a53579faf467f81da9af7c92fedc0dbef432c9cd3eebe1283869194cf

See more details on using hashes here.

Supported by

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