Getting Started

Installing

It is available in PyPi, so you can install through pip:

pip install sure

Python version compatibility

Sure is continuously tested against python versions 3.6, 3.7, 3.9, 3.10, 3.11 and 3.12 of the cpython implementation.

It is not unlikely to work with other Python implementations such as PyPy or Jython with the added caveat that its Special Syntax is most likely to not work in any implementations other than cpython while the Standard Behavior is likely to work well.

Standard Behavior Example

from sure import expect

expect("this".replace("is", "at")).to.equal("that")

Special Syntax Example

"this".replace("is", "at").should.equal("that")

Note

The Special Syntax can be enabled via command-line with the --special-syntax flag or programmatically with the statement sure.enable_special_syntax()