sure


Namesure JSON
Version 2.0.1 PyPI version JSON
download
home_pagehttp://github.com/gabrielfalcao/sure
Summaryutility belt for automated testing in python for python
upload_time2023-02-06 11:58:48
maintainerTimo Furrer
docs_urlhttps://pythonhosted.org/sure/
authorGabriel Falcao
requires_python
license
keywords
VCS
bugtrack_url
requirements click couleur coverage
Travis-CI No Travis.
coveralls test coverage
            sure
====

.. image:: https://img.shields.io/pypi/dm/sure
   :target: https://pypi.org/project/sure

.. image:: https://github.com/gabrielfalcao/sure/workflows/Sure%20Tests/badge.svg
   :target: https://github.com/gabrielfalcao/sure/actions?query=workflow%3A%22Sure+Tests%22

.. image:: https://img.shields.io/readthedocs/sure
   :target: https://sure.readthedocs.io/

.. image:: https://img.shields.io/github/license/gabrielfalcao/sure?label=Github%20License
   :target: https://github.com/gabrielfalcao/sure/blob/master/LICENSE

.. image:: https://img.shields.io/pypi/v/sure
   :target: https://pypi.org/project/sure

.. image:: https://img.shields.io/pypi/l/sure?label=PyPi%20License
   :target: https://pypi.org/project/sure

.. image:: https://img.shields.io/pypi/format/sure
   :target: https://pypi.org/project/sure

.. image:: https://img.shields.io/pypi/status/sure
   :target: https://pypi.org/project/sure

.. image:: https://img.shields.io/pypi/pyversions/sure
   :target: https://pypi.org/project/sure

.. image:: https://img.shields.io/pypi/implementation/sure
   :target: https://pypi.org/project/sure

.. image:: https://img.shields.io/github/v/tag/gabrielfalcao/sure
   :target: https://github.com/gabrielfalcao/sure/releases

.. image:: https://img.shields.io/badge/pydoc-web-ff69b4.svg
   :target: http://pydoc.net/sure

An idiomatic testing library for python with powerful and flexible assertions, created by `Gabriel Falcão <https://github.com/gabrielfalcao>`_.
Sure's developer experience is inspired and modeled after `RSpec Expectations
<http://rspec.info/documentation/3.5/rspec-expectations/>`_ and
`should.js <https://github.com/shouldjs/should.js>`_.

Installing
----------

.. code:: bash

    $ pip install sure

Documentation
-------------

Available in the `website <https://sure.readthedocs.io/en/latest/>`__ or under the
``docs`` directory.

You can also build the documentation locally using sphinx:

.. code:: bash

    make docs

Here is a tease
---------------

Equality
~~~~~~~~

(number).should.equal(number)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. code:: python

    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
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. code:: python

    {'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
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. code:: python

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

            

Raw data

            {
    "_id": null,
    "home_page": "http://github.com/gabrielfalcao/sure",
    "name": "sure",
    "maintainer": "Timo Furrer",
    "docs_url": "https://pythonhosted.org/sure/",
    "requires_python": "",
    "maintainer_email": "tuxtimo@gmail.com",
    "keywords": "",
    "author": "Gabriel Falcao",
    "author_email": "gabriel@nacaolivre.org",
    "download_url": "https://files.pythonhosted.org/packages/dd/ae/eb28ee3b6768e51cb938abcf521cb678217203f33385a2df54d3f23331c5/sure-2.0.1.tar.gz",
    "platform": null,
    "description": "sure\n====\n\n.. image:: https://img.shields.io/pypi/dm/sure\n   :target: https://pypi.org/project/sure\n\n.. image:: https://github.com/gabrielfalcao/sure/workflows/Sure%20Tests/badge.svg\n   :target: https://github.com/gabrielfalcao/sure/actions?query=workflow%3A%22Sure+Tests%22\n\n.. image:: https://img.shields.io/readthedocs/sure\n   :target: https://sure.readthedocs.io/\n\n.. image:: https://img.shields.io/github/license/gabrielfalcao/sure?label=Github%20License\n   :target: https://github.com/gabrielfalcao/sure/blob/master/LICENSE\n\n.. image:: https://img.shields.io/pypi/v/sure\n   :target: https://pypi.org/project/sure\n\n.. image:: https://img.shields.io/pypi/l/sure?label=PyPi%20License\n   :target: https://pypi.org/project/sure\n\n.. image:: https://img.shields.io/pypi/format/sure\n   :target: https://pypi.org/project/sure\n\n.. image:: https://img.shields.io/pypi/status/sure\n   :target: https://pypi.org/project/sure\n\n.. image:: https://img.shields.io/pypi/pyversions/sure\n   :target: https://pypi.org/project/sure\n\n.. image:: https://img.shields.io/pypi/implementation/sure\n   :target: https://pypi.org/project/sure\n\n.. image:: https://img.shields.io/github/v/tag/gabrielfalcao/sure\n   :target: https://github.com/gabrielfalcao/sure/releases\n\n.. image:: https://img.shields.io/badge/pydoc-web-ff69b4.svg\n   :target: http://pydoc.net/sure\n\nAn idiomatic testing library for python with powerful and flexible assertions, created by `Gabriel Falc\u00e3o <https://github.com/gabrielfalcao>`_.\nSure's developer experience is inspired and modeled after `RSpec Expectations\n<http://rspec.info/documentation/3.5/rspec-expectations/>`_ and\n`should.js <https://github.com/shouldjs/should.js>`_.\n\nInstalling\n----------\n\n.. code:: bash\n\n    $ pip install sure\n\nDocumentation\n-------------\n\nAvailable in the `website <https://sure.readthedocs.io/en/latest/>`__ or under the\n``docs`` directory.\n\nYou can also build the documentation locally using sphinx:\n\n.. code:: bash\n\n    make docs\n\nHere is a tease\n---------------\n\nEquality\n~~~~~~~~\n\n(number).should.equal(number)\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. code:: python\n\n    import sure\n\n    (4).should.be.equal(2 + 2)\n    (7.5).should.eql(3.5 + 4)\n\n    (3).shouldnt.be.equal(5)\n\nAssert dictionary and its contents\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. code:: python\n\n    {'foo': 'bar'}.should.equal({'foo': 'bar'})\n    {'foo': 'bar'}.should.have.key('foo').which.should.equal('bar')\n\n\"A string\".lower().should.equal(\"a string\") also works\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. code:: python\n\n    \"Awesome ASSERTIONS\".lower().split().should.equal(['awesome', 'assertions'])\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "utility belt for automated testing in python for python",
    "version": "2.0.1",
    "project_urls": {
        "Homepage": "http://github.com/gabrielfalcao/sure"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ddaeeb28ee3b6768e51cb938abcf521cb678217203f33385a2df54d3f23331c5",
                "md5": "ec12c1e6a50cfac8dbe119943a4ddc6f",
                "sha256": "c8fc6fabc0e7f6984eeabb942540e45646e5bef0bb99fe59e02da634e4d4b9ca"
            },
            "downloads": -1,
            "filename": "sure-2.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "ec12c1e6a50cfac8dbe119943a4ddc6f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 48467,
            "upload_time": "2023-02-06T11:58:48",
            "upload_time_iso_8601": "2023-02-06T11:58:48.043242Z",
            "url": "https://files.pythonhosted.org/packages/dd/ae/eb28ee3b6768e51cb938abcf521cb678217203f33385a2df54d3f23331c5/sure-2.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-02-06 11:58:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "gabrielfalcao",
    "github_project": "sure",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [
        {
            "name": "click",
            "specs": [
                [
                    "==",
                    "8.1.7"
                ]
            ]
        },
        {
            "name": "couleur",
            "specs": [
                [
                    "==",
                    "0.7.4"
                ]
            ]
        },
        {
            "name": "coverage",
            "specs": [
                [
                    "==",
                    "7.4.0"
                ]
            ]
        }
    ],
    "tox": true,
    "lcname": "sure"
}
        
Elapsed time: 0.22446s