PyHamcrest


NamePyHamcrest JSON
Version 2.1.0 PyPI version JSON
download
home_page
SummaryHamcrest framework for matcher objects
upload_time2023-10-22 15:47:28
maintainer
docs_urlhttps://pythonhosted.org/PyHamcrest/
authorSimon Brunning, Jon Reid
requires_python>=3.6
licenseBSD License Copyright 2020 hamcrest.org All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of Hamcrest nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
keywords hamcrest matchers pyunit test testing unit unittest unittesting
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            PyHamcrest
==========

| |docs| |status| |version| |downloads|

.. |docs| image:: https://readthedocs.org/projects/pyhamcrest/badge/?version=latest
    :target: https://pyhamcrest.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation Status

.. |status| image:: https://github.com/hamcrest/PyHamcrest/workflows/CI/badge.svg
    :alt: CI Build Status
    :target: https://github.com/hamcrest/PyHamcrest/actions?query=workflow%3ACI

.. |version| image:: http://img.shields.io/pypi/v/PyHamcrest.svg?style=flat
    :alt: PyPI Package latest release
    :target: https://pypi.python.org/pypi/PyHamcrest

.. |downloads| image:: http://img.shields.io/pypi/dm/PyHamcrest.svg?style=flat
    :alt: PyPI Package monthly downloads
    :target: https://pypi.python.org/pypi/PyHamcrest


Introduction
============

PyHamcrest is a framework for writing matcher objects, allowing you to
declaratively define "match" rules. There are a number of situations where
matchers are invaluable, such as UI validation, or data filtering, but it is in
the area of writing flexible tests that matchers are most commonly used. This
tutorial shows you how to use PyHamcrest for unit testing.

When writing tests it is sometimes difficult to get the balance right between
overspecifying the test (and making it brittle to changes), and not specifying
enough (making the test less valuable since it continues to pass even when the
thing being tested is broken). Having a tool that allows you to pick out
precisely the aspect under test and describe the values it should have, to a
controlled level of precision, helps greatly in writing tests that are "just
right." Such tests fail when the behavior of the aspect under test deviates
from the expected behavior, yet continue to pass when minor, unrelated changes
to the behaviour are made.

Installation
============

Hamcrest can be installed using the usual Python packaging tools. It depends on
distribute, but as long as you have a network connection when you install, the
installation process will take care of that for you.

For example:

.. code::

 pip install PyHamcrest

My first PyHamcrest test
========================

We'll start by writing a very simple PyUnit test, but instead of using PyUnit's
``assertEqual`` method, we'll use PyHamcrest's ``assert_that`` construct and
the standard set of matchers:

.. code:: python

 from hamcrest import assert_that, equal_to
 import unittest


 class BiscuitTest(unittest.TestCase):
     def testEquals(self):
         theBiscuit = Biscuit("Ginger")
         myBiscuit = Biscuit("Ginger")
         assert_that(theBiscuit, equal_to(myBiscuit))


 if __name__ == "__main__":
     unittest.main()

The ``assert_that`` function is a stylized sentence for making a test
assertion. In this example, the subject of the assertion is the object
``theBiscuit``, which is the first method parameter. The second method
parameter is a matcher for ``Biscuit`` objects, here a matcher that checks one
object is equal to another using the Python ``==`` operator. The test passes
since the ``Biscuit`` class defines an ``__eq__`` method.

If you have more than one assertion in your test you can include an identifier
for the tested value in the assertion:

.. code:: python

 assert_that(theBiscuit.getChocolateChipCount(), equal_to(10), "chocolate chips")
 assert_that(theBiscuit.getHazelnutCount(), equal_to(3), "hazelnuts")

As a convenience, assert_that can also be used to verify a boolean condition:

.. code:: python

 assert_that(theBiscuit.isCooked(), "cooked")

This is equivalent to the ``assert_`` method of unittest.TestCase, but because
it's a standalone function, it offers greater flexibility in test writing.


Predefined matchers
===================

PyHamcrest comes with a library of useful matchers:

* Object

  * ``equal_to`` - match equal object
  * ``has_length`` - match ``len()``
  * ``has_property`` - match value of property with given name
  * ``has_properties`` - match an object that has all of the given properties.
  * ``has_string`` - match ``str()``
  * ``instance_of`` - match object type
  * ``none``, ``not_none`` - match ``None``, or not ``None``
  * ``same_instance`` - match same object
  * ``calling, raises`` - wrap a method call and assert that it raises an exception

* Number

  * ``close_to`` - match number close to a given value
  * ``greater_than``, ``greater_than_or_equal_to``, ``less_than``,
    ``less_than_or_equal_to`` - match numeric ordering

* Text

  * ``contains_string`` - match part of a string
  * ``ends_with`` - match the end of a string
  * ``equal_to_ignoring_case`` - match the complete string but ignore case
  * ``equal_to_ignoring_whitespace`` - match the complete string but ignore extra whitespace
  * ``matches_regexp`` - match a regular expression in a string
  * ``starts_with`` - match the beginning of a string
  * ``string_contains_in_order`` - match parts of a string, in relative order

* Logical

  * ``all_of`` - ``and`` together all matchers
  * ``any_of`` - ``or`` together all matchers
  * ``anything`` - match anything, useful in composite matchers when you don't care about a particular value
  * ``is_not``, ``not_`` - negate the matcher

* Sequence

  * ``contains`` - exactly match the entire sequence
  * ``contains_inanyorder`` - match the entire sequence, but in any order
  * ``has_item`` - match if given item appears in the sequence
  * ``has_items`` - match if all given items appear in the sequence, in any order
  * ``is_in`` - match if item appears in the given sequence
  * ``only_contains`` - match if sequence's items appear in given list
  * ``empty`` - match if the sequence is empty

* Dictionary

  * ``has_entries`` - match dictionary with list of key-value pairs
  * ``has_entry`` - match dictionary containing a key-value pair
  * ``has_key`` - match dictionary with a key
  * ``has_value`` - match dictionary with a value

* Decorator

  * ``calling`` - wrap a callable in a deferred object, for subsequent matching on calling behaviour
  * ``raises`` - Ensure that a deferred callable raises as expected
  * ``described_as`` - give the matcher a custom failure description
  * ``is_`` - decorator to improve readability - see `Syntactic sugar` below

The arguments for many of these matchers accept not just a matching value, but
another matcher, so matchers can be composed for greater flexibility. For
example, ``only_contains(less_than(5))`` will match any sequence where every
item is less than 5.


Syntactic sugar
===============

PyHamcrest strives to make your tests as readable as possible. For example, the
``is_`` matcher is a wrapper that doesn't add any extra behavior to the
underlying matcher. The following assertions are all equivalent:

.. code:: python

 assert_that(theBiscuit, equal_to(myBiscuit))
 assert_that(theBiscuit, is_(equal_to(myBiscuit)))
 assert_that(theBiscuit, is_(myBiscuit))

The last form is allowed since ``is_(value)`` wraps most non-matcher arguments
with ``equal_to``. But if the argument is a type, it is wrapped with
``instance_of``, so the following are also equivalent:

.. code:: python

 assert_that(theBiscuit, instance_of(Biscuit))
 assert_that(theBiscuit, is_(instance_of(Biscuit)))
 assert_that(theBiscuit, is_(Biscuit))

*Note that PyHamcrest's ``is_`` matcher is unrelated to Python's ``is``
operator. The matcher for object identity is ``same_instance``.*


Writing custom matchers
=======================

PyHamcrest comes bundled with lots of useful matchers, but you'll probably find
that you need to create your own from time to time to fit your testing needs.
This commonly occurs when you find a fragment of code that tests the same set
of properties over and over again (and in different tests), and you want to
bundle the fragment into a single assertion. By writing your own matcher you'll
eliminate code duplication and make your tests more readable!

Let's write our own matcher for testing if a calendar date falls on a Saturday.
This is the test we want to write:

.. code:: python

 def testDateIsOnASaturday(self):
     d = datetime.date(2008, 4, 26)
     assert_that(d, is_(on_a_saturday()))

And here's the implementation:

.. code:: python

 from hamcrest.core.base_matcher import BaseMatcher
 from hamcrest.core.helpers.hasmethod import hasmethod


 class IsGivenDayOfWeek(BaseMatcher):
     def __init__(self, day):
         self.day = day  # Monday is 0, Sunday is 6

     def _matches(self, item):
         if not hasmethod(item, "weekday"):
             return False
         return item.weekday() == self.day

     def describe_to(self, description):
         day_as_string = [
             "Monday",
             "Tuesday",
             "Wednesday",
             "Thursday",
             "Friday",
             "Saturday",
             "Sunday",
         ]
         description.append_text("calendar date falling on ").append_text(
             day_as_string[self.day]
         )


 def on_a_saturday():
     return IsGivenDayOfWeek(5)

For our Matcher implementation we implement the ``_matches`` method - which
calls the ``weekday`` method after confirming that the argument (which may not
be a date) has such a method - and the ``describe_to`` method - which is used
to produce a failure message when a test fails. Here's an example of how the
failure message looks:

.. code:: python

 assert_that(datetime.date(2008, 4, 6), is_(on_a_saturday()))

fails with the message::

    AssertionError:
    Expected: is calendar date falling on Saturday
         got: <2008-04-06>

Let's say this matcher is saved in a module named ``isgivendayofweek``. We
could use it in our test by importing the factory function ``on_a_saturday``:

.. code:: python

 from hamcrest import assert_that, is_
 import unittest
 from isgivendayofweek import on_a_saturday


 class DateTest(unittest.TestCase):
     def testDateIsOnASaturday(self):
         d = datetime.date(2008, 4, 26)
         assert_that(d, is_(on_a_saturday()))


 if __name__ == "__main__":
     unittest.main()

Even though the ``on_a_saturday`` function creates a new matcher each time it
is called, you should not assume this is the only usage pattern for your
matcher. Therefore you should make sure your matcher is stateless, so a single
instance can be reused between matches.


More resources
==============

* Documentation_
* Package_
* Sources_
* Hamcrest_

.. _Documentation: https://pyhamcrest.readthedocs.io/
.. _Package: http://pypi.python.org/pypi/PyHamcrest
.. _Sources: https://github.com/hamcrest/PyHamcrest
.. _Hamcrest: http://hamcrest.org

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "PyHamcrest",
    "maintainer": "",
    "docs_url": "https://pythonhosted.org/PyHamcrest/",
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "hamcrest,matchers,pyunit,test,testing,unit,unittest,unittesting",
    "author": "Simon Brunning, Jon Reid",
    "author_email": "Chris Rose <offline@offby1.net>",
    "download_url": "https://files.pythonhosted.org/packages/16/3f/f286caba4e64391a8dc9200e6de6ce0d07471e3f718248c3276843b7793b/pyhamcrest-2.1.0.tar.gz",
    "platform": null,
    "description": "PyHamcrest\n==========\n\n| |docs| |status| |version| |downloads|\n\n.. |docs| image:: https://readthedocs.org/projects/pyhamcrest/badge/?version=latest\n    :target: https://pyhamcrest.readthedocs.io/en/latest/?badge=latest\n    :alt: Documentation Status\n\n.. |status| image:: https://github.com/hamcrest/PyHamcrest/workflows/CI/badge.svg\n    :alt: CI Build Status\n    :target: https://github.com/hamcrest/PyHamcrest/actions?query=workflow%3ACI\n\n.. |version| image:: http://img.shields.io/pypi/v/PyHamcrest.svg?style=flat\n    :alt: PyPI Package latest release\n    :target: https://pypi.python.org/pypi/PyHamcrest\n\n.. |downloads| image:: http://img.shields.io/pypi/dm/PyHamcrest.svg?style=flat\n    :alt: PyPI Package monthly downloads\n    :target: https://pypi.python.org/pypi/PyHamcrest\n\n\nIntroduction\n============\n\nPyHamcrest is a framework for writing matcher objects, allowing you to\ndeclaratively define \"match\" rules. There are a number of situations where\nmatchers are invaluable, such as UI validation, or data filtering, but it is in\nthe area of writing flexible tests that matchers are most commonly used. This\ntutorial shows you how to use PyHamcrest for unit testing.\n\nWhen writing tests it is sometimes difficult to get the balance right between\noverspecifying the test (and making it brittle to changes), and not specifying\nenough (making the test less valuable since it continues to pass even when the\nthing being tested is broken). Having a tool that allows you to pick out\nprecisely the aspect under test and describe the values it should have, to a\ncontrolled level of precision, helps greatly in writing tests that are \"just\nright.\" Such tests fail when the behavior of the aspect under test deviates\nfrom the expected behavior, yet continue to pass when minor, unrelated changes\nto the behaviour are made.\n\nInstallation\n============\n\nHamcrest can be installed using the usual Python packaging tools. It depends on\ndistribute, but as long as you have a network connection when you install, the\ninstallation process will take care of that for you.\n\nFor example:\n\n.. code::\n\n pip install PyHamcrest\n\nMy first PyHamcrest test\n========================\n\nWe'll start by writing a very simple PyUnit test, but instead of using PyUnit's\n``assertEqual`` method, we'll use PyHamcrest's ``assert_that`` construct and\nthe standard set of matchers:\n\n.. code:: python\n\n from hamcrest import assert_that, equal_to\n import unittest\n\n\n class BiscuitTest(unittest.TestCase):\n     def testEquals(self):\n         theBiscuit = Biscuit(\"Ginger\")\n         myBiscuit = Biscuit(\"Ginger\")\n         assert_that(theBiscuit, equal_to(myBiscuit))\n\n\n if __name__ == \"__main__\":\n     unittest.main()\n\nThe ``assert_that`` function is a stylized sentence for making a test\nassertion. In this example, the subject of the assertion is the object\n``theBiscuit``, which is the first method parameter. The second method\nparameter is a matcher for ``Biscuit`` objects, here a matcher that checks one\nobject is equal to another using the Python ``==`` operator. The test passes\nsince the ``Biscuit`` class defines an ``__eq__`` method.\n\nIf you have more than one assertion in your test you can include an identifier\nfor the tested value in the assertion:\n\n.. code:: python\n\n assert_that(theBiscuit.getChocolateChipCount(), equal_to(10), \"chocolate chips\")\n assert_that(theBiscuit.getHazelnutCount(), equal_to(3), \"hazelnuts\")\n\nAs a convenience, assert_that can also be used to verify a boolean condition:\n\n.. code:: python\n\n assert_that(theBiscuit.isCooked(), \"cooked\")\n\nThis is equivalent to the ``assert_`` method of unittest.TestCase, but because\nit's a standalone function, it offers greater flexibility in test writing.\n\n\nPredefined matchers\n===================\n\nPyHamcrest comes with a library of useful matchers:\n\n* Object\n\n  * ``equal_to`` - match equal object\n  * ``has_length`` - match ``len()``\n  * ``has_property`` - match value of property with given name\n  * ``has_properties`` - match an object that has all of the given properties.\n  * ``has_string`` - match ``str()``\n  * ``instance_of`` - match object type\n  * ``none``, ``not_none`` - match ``None``, or not ``None``\n  * ``same_instance`` - match same object\n  * ``calling, raises`` - wrap a method call and assert that it raises an exception\n\n* Number\n\n  * ``close_to`` - match number close to a given value\n  * ``greater_than``, ``greater_than_or_equal_to``, ``less_than``,\n    ``less_than_or_equal_to`` - match numeric ordering\n\n* Text\n\n  * ``contains_string`` - match part of a string\n  * ``ends_with`` - match the end of a string\n  * ``equal_to_ignoring_case`` - match the complete string but ignore case\n  * ``equal_to_ignoring_whitespace`` - match the complete string but ignore extra whitespace\n  * ``matches_regexp`` - match a regular expression in a string\n  * ``starts_with`` - match the beginning of a string\n  * ``string_contains_in_order`` - match parts of a string, in relative order\n\n* Logical\n\n  * ``all_of`` - ``and`` together all matchers\n  * ``any_of`` - ``or`` together all matchers\n  * ``anything`` - match anything, useful in composite matchers when you don't care about a particular value\n  * ``is_not``, ``not_`` - negate the matcher\n\n* Sequence\n\n  * ``contains`` - exactly match the entire sequence\n  * ``contains_inanyorder`` - match the entire sequence, but in any order\n  * ``has_item`` - match if given item appears in the sequence\n  * ``has_items`` - match if all given items appear in the sequence, in any order\n  * ``is_in`` - match if item appears in the given sequence\n  * ``only_contains`` - match if sequence's items appear in given list\n  * ``empty`` - match if the sequence is empty\n\n* Dictionary\n\n  * ``has_entries`` - match dictionary with list of key-value pairs\n  * ``has_entry`` - match dictionary containing a key-value pair\n  * ``has_key`` - match dictionary with a key\n  * ``has_value`` - match dictionary with a value\n\n* Decorator\n\n  * ``calling`` - wrap a callable in a deferred object, for subsequent matching on calling behaviour\n  * ``raises`` - Ensure that a deferred callable raises as expected\n  * ``described_as`` - give the matcher a custom failure description\n  * ``is_`` - decorator to improve readability - see `Syntactic sugar` below\n\nThe arguments for many of these matchers accept not just a matching value, but\nanother matcher, so matchers can be composed for greater flexibility. For\nexample, ``only_contains(less_than(5))`` will match any sequence where every\nitem is less than 5.\n\n\nSyntactic sugar\n===============\n\nPyHamcrest strives to make your tests as readable as possible. For example, the\n``is_`` matcher is a wrapper that doesn't add any extra behavior to the\nunderlying matcher. The following assertions are all equivalent:\n\n.. code:: python\n\n assert_that(theBiscuit, equal_to(myBiscuit))\n assert_that(theBiscuit, is_(equal_to(myBiscuit)))\n assert_that(theBiscuit, is_(myBiscuit))\n\nThe last form is allowed since ``is_(value)`` wraps most non-matcher arguments\nwith ``equal_to``. But if the argument is a type, it is wrapped with\n``instance_of``, so the following are also equivalent:\n\n.. code:: python\n\n assert_that(theBiscuit, instance_of(Biscuit))\n assert_that(theBiscuit, is_(instance_of(Biscuit)))\n assert_that(theBiscuit, is_(Biscuit))\n\n*Note that PyHamcrest's ``is_`` matcher is unrelated to Python's ``is``\noperator. The matcher for object identity is ``same_instance``.*\n\n\nWriting custom matchers\n=======================\n\nPyHamcrest comes bundled with lots of useful matchers, but you'll probably find\nthat you need to create your own from time to time to fit your testing needs.\nThis commonly occurs when you find a fragment of code that tests the same set\nof properties over and over again (and in different tests), and you want to\nbundle the fragment into a single assertion. By writing your own matcher you'll\neliminate code duplication and make your tests more readable!\n\nLet's write our own matcher for testing if a calendar date falls on a Saturday.\nThis is the test we want to write:\n\n.. code:: python\n\n def testDateIsOnASaturday(self):\n     d = datetime.date(2008, 4, 26)\n     assert_that(d, is_(on_a_saturday()))\n\nAnd here's the implementation:\n\n.. code:: python\n\n from hamcrest.core.base_matcher import BaseMatcher\n from hamcrest.core.helpers.hasmethod import hasmethod\n\n\n class IsGivenDayOfWeek(BaseMatcher):\n     def __init__(self, day):\n         self.day = day  # Monday is 0, Sunday is 6\n\n     def _matches(self, item):\n         if not hasmethod(item, \"weekday\"):\n             return False\n         return item.weekday() == self.day\n\n     def describe_to(self, description):\n         day_as_string = [\n             \"Monday\",\n             \"Tuesday\",\n             \"Wednesday\",\n             \"Thursday\",\n             \"Friday\",\n             \"Saturday\",\n             \"Sunday\",\n         ]\n         description.append_text(\"calendar date falling on \").append_text(\n             day_as_string[self.day]\n         )\n\n\n def on_a_saturday():\n     return IsGivenDayOfWeek(5)\n\nFor our Matcher implementation we implement the ``_matches`` method - which\ncalls the ``weekday`` method after confirming that the argument (which may not\nbe a date) has such a method - and the ``describe_to`` method - which is used\nto produce a failure message when a test fails. Here's an example of how the\nfailure message looks:\n\n.. code:: python\n\n assert_that(datetime.date(2008, 4, 6), is_(on_a_saturday()))\n\nfails with the message::\n\n    AssertionError:\n    Expected: is calendar date falling on Saturday\n         got: <2008-04-06>\n\nLet's say this matcher is saved in a module named ``isgivendayofweek``. We\ncould use it in our test by importing the factory function ``on_a_saturday``:\n\n.. code:: python\n\n from hamcrest import assert_that, is_\n import unittest\n from isgivendayofweek import on_a_saturday\n\n\n class DateTest(unittest.TestCase):\n     def testDateIsOnASaturday(self):\n         d = datetime.date(2008, 4, 26)\n         assert_that(d, is_(on_a_saturday()))\n\n\n if __name__ == \"__main__\":\n     unittest.main()\n\nEven though the ``on_a_saturday`` function creates a new matcher each time it\nis called, you should not assume this is the only usage pattern for your\nmatcher. Therefore you should make sure your matcher is stateless, so a single\ninstance can be reused between matches.\n\n\nMore resources\n==============\n\n* Documentation_\n* Package_\n* Sources_\n* Hamcrest_\n\n.. _Documentation: https://pyhamcrest.readthedocs.io/\n.. _Package: http://pypi.python.org/pypi/PyHamcrest\n.. _Sources: https://github.com/hamcrest/PyHamcrest\n.. _Hamcrest: http://hamcrest.org\n",
    "bugtrack_url": null,
    "license": "BSD License  Copyright 2020 hamcrest.org All rights reserved.  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.  Neither the name of Hamcrest nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.",
    "summary": "Hamcrest framework for matcher objects",
    "version": "2.1.0",
    "project_urls": {
        "History": "https://github.com/hamcrest/PyHamcrest/blob/main/CHANGELOG.rst",
        "Issues": "https://github.com/hamcrest/PyHamcrest/issues",
        "Source": "https://github.com/hamcrest/PyHamcrest/"
    },
    "split_keywords": [
        "hamcrest",
        "matchers",
        "pyunit",
        "test",
        "testing",
        "unit",
        "unittest",
        "unittesting"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0c711b25d3797a24add00f6f8c1bb0ac03a38616e2ec6606f598c1d50b0b0ffb",
                "md5": "5b403b68307779ad5eab6fcc58cd446d",
                "sha256": "f6913d2f392e30e0375b3ecbd7aee79e5d1faa25d345c8f4ff597665dcac2587"
            },
            "downloads": -1,
            "filename": "pyhamcrest-2.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5b403b68307779ad5eab6fcc58cd446d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 54555,
            "upload_time": "2023-10-22T15:47:25",
            "upload_time_iso_8601": "2023-10-22T15:47:25.080484Z",
            "url": "https://files.pythonhosted.org/packages/0c/71/1b25d3797a24add00f6f8c1bb0ac03a38616e2ec6606f598c1d50b0b0ffb/pyhamcrest-2.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "163ff286caba4e64391a8dc9200e6de6ce0d07471e3f718248c3276843b7793b",
                "md5": "c731efc9bcb93ef4f73d110f5ca8e844",
                "sha256": "c6acbec0923d0cb7e72c22af1926f3e7c97b8e8d69fc7498eabacaf7c975bd9c"
            },
            "downloads": -1,
            "filename": "pyhamcrest-2.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "c731efc9bcb93ef4f73d110f5ca8e844",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 60538,
            "upload_time": "2023-10-22T15:47:28",
            "upload_time_iso_8601": "2023-10-22T15:47:28.255462Z",
            "url": "https://files.pythonhosted.org/packages/16/3f/f286caba4e64391a8dc9200e6de6ce0d07471e3f718248c3276843b7793b/pyhamcrest-2.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-22 15:47:28",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hamcrest",
    "github_project": "PyHamcrest",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "pyhamcrest"
}
        
Elapsed time: 0.30699s