surer


Namesurer JSON
Version 0.0.3 PyPI version JSON
download
home_pagehttps://github.com/getmoto/surer
Summary
upload_time2023-01-08 12:28:20
maintainerBert Blommers
docs_urlNone
authorGabriel Falcao
requires_python>=3.6
licenseApache License 2.0
keywords test assertions fluent
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            surer
=====



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

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

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

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

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

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

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

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

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

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


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>`_.

This is a fork of Gabriel's `sure` library, maintained at `http://github.com/getmoto/surer`. It provides support for more recent Python-versions, but does not differ in functionality.

Installing
----------

.. code:: bash

    $ pip install surer

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

Available in the `website <https://surer.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 surer

    (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": "https://github.com/getmoto/surer",
    "name": "surer",
    "maintainer": "Bert Blommers",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "test assertions fluent",
    "author": "Gabriel Falcao",
    "author_email": "\"gabriel@nacaolivre.org\"",
    "download_url": "https://files.pythonhosted.org/packages/e8/5b/0f2790224af8619362df063eb567628f4ef07583d1dd223ecf8fca968ed2/surer-0.0.3.tar.gz",
    "platform": null,
    "description": "surer\n=====\n\n\n\n.. image:: https://img.shields.io/pypi/dm/surer\n   :target: https://pypi.org/project/surer\n\n.. image:: https://github.com/getmoto/surer/workflows/Sure%20Tests/badge.svg\n   :target: https://github.com/getmoto/surer/actions?query=workflow%3A%22Sure+Tests%22\n\n.. image:: https://img.shields.io/readthedocs/sure\n   :target: https://surer.readthedocs.io/\n\n.. image:: https://img.shields.io/github/license/getmoto/surer?label=Github%20License\n   :target: https://github.com/getmoto/surer/blob/master/LICENSE\n\n.. image:: https://img.shields.io/pypi/v/surer\n   :target: https://pypi.org/project/surer\n\n.. image:: https://img.shields.io/pypi/l/surer?label=PyPi%20License\n   :target: https://pypi.org/project/surer\n\n.. image:: https://img.shields.io/pypi/format/surer\n   :target: https://pypi.org/project/surer\n\n.. image:: https://img.shields.io/pypi/status/surer\n   :target: https://pypi.org/project/surer\n\n.. image:: https://img.shields.io/pypi/pyversions/surer\n   :target: https://pypi.org/project/surer\n\n.. image:: https://img.shields.io/pypi/implementation/surer\n   :target: https://pypi.org/project/surer\n\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\nThis is a fork of Gabriel's `sure` library, maintained at `http://github.com/getmoto/surer`. It provides support for more recent Python-versions, but does not differ in functionality.\n\nInstalling\n----------\n\n.. code:: bash\n\n    $ pip install surer\n\nDocumentation\n-------------\n\nAvailable in the `website <https://surer.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 surer\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": "Apache License 2.0",
    "summary": "",
    "version": "0.0.3",
    "split_keywords": [
        "test",
        "assertions",
        "fluent"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ac630415d1f791b65718f83914f157259af5faffc3df6e7d13ce9aa2cf8fbe4d",
                "md5": "d65932b182ea4bff241d92ca7784cbfb",
                "sha256": "ff21a579db122745d0a126151801a757ddc624fd47aada8641f4b41da1e50117"
            },
            "downloads": -1,
            "filename": "surer-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d65932b182ea4bff241d92ca7784cbfb",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 34791,
            "upload_time": "2023-01-08T12:28:19",
            "upload_time_iso_8601": "2023-01-08T12:28:19.686951Z",
            "url": "https://files.pythonhosted.org/packages/ac/63/0415d1f791b65718f83914f157259af5faffc3df6e7d13ce9aa2cf8fbe4d/surer-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e85b0f2790224af8619362df063eb567628f4ef07583d1dd223ecf8fca968ed2",
                "md5": "5b0681b93d4962e0bccada66c8cd8f9d",
                "sha256": "e6af001061b0c642a41fa08a535e87a1e5211a55c97e0511cdcdf4d62e337ae6"
            },
            "downloads": -1,
            "filename": "surer-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "5b0681b93d4962e0bccada66c8cd8f9d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 45808,
            "upload_time": "2023-01-08T12:28:20",
            "upload_time_iso_8601": "2023-01-08T12:28:20.904042Z",
            "url": "https://files.pythonhosted.org/packages/e8/5b/0f2790224af8619362df063eb567628f4ef07583d1dd223ecf8fca968ed2/surer-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-08 12:28:20",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "getmoto",
    "github_project": "surer",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [],
    "lcname": "surer"
}
        
Elapsed time: 0.03369s