Skip to main content

utility belt for automated testing in python for python

Project description

https://img.shields.io/pypi/dm/sure https://github.com/gabrielfalcao/sure/workflows/Sure%20Tests/badge.svg https://img.shields.io/readthedocs/sure https://img.shields.io/github/license/gabrielfalcao/sure?label=Github%20License https://img.shields.io/pypi/v/sure https://img.shields.io/pypi/l/sure?label=PyPi%20License https://img.shields.io/pypi/format/sure https://img.shields.io/pypi/status/sure https://img.shields.io/pypi/pyversions/sure https://img.shields.io/pypi/implementation/sure https://img.shields.io/github/v/tag/gabrielfalcao/sure https://img.shields.io/badge/pydoc-web-ff69b4.svg

An idiomatic testing library for python with powerful and flexible assertions, created by Gabriel Falcão. Sure’s developer experience is inspired and modeled after RSpec Expectations and should.js.

Installing

$ pip install sure

Documentation

Available in the website or under the docs directory.

You can also build the documentation locally using sphinx:

make docs

Here is a tease

Equality

(number).should.equal(number)

import sure

(4).should.be.equal(2 + 2)
(7.5).should.eql(3.5 + 4)

(3).shouldnt.be.equal(5)

Assert dictionary and its contents

{'foo': 'bar'}.should.equal({'foo': 'bar'})
{'foo': 'bar'}.should.have.key('foo').which.should.equal('bar')

“A string”.lower().should.equal(“a string”) also works

"Awesome ASSERTIONS".lower().split().should.equal(['awesome', 'assertions'])

Project details


Release history Release notifications | RSS feed

This version

2.0.1

Download files

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

Source Distribution

sure-2.0.1.tar.gz (48.5 kB view details)

Uploaded Source

File details

Details for the file sure-2.0.1.tar.gz.

File metadata

  • Download URL: sure-2.0.1.tar.gz
  • Upload date:
  • Size: 48.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/6.0.0 pkginfo/1.9.6 requests/2.28.2 requests-toolbelt/0.10.1 tqdm/4.64.1 CPython/3.10.9

File hashes

Hashes for sure-2.0.1.tar.gz
Algorithm Hash digest
SHA256 c8fc6fabc0e7f6984eeabb942540e45646e5bef0bb99fe59e02da634e4d4b9ca
MD5 ec12c1e6a50cfac8dbe119943a4ddc6f
BLAKE2b-256 ddaeeb28ee3b6768e51cb938abcf521cb678217203f33385a2df54d3f23331c5

See more details on using hashes here.

Supported by

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