Pyhamcrest

Latest version: v2.1.0

Safety actively analyzes 629908 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 5

1.6

-----------

27 Sep 2011
(All changes by Chris Rose unless otherwise noted.)

* Packaging:
- Python 3.2 support.

* New matchers:
- has_property('property_name', value_matcher) matches if object has a property with a given name whose value satisfies a given matcher.

* Improvements:
- hasEntries supports two new calling conventions:
has_entries({'key' : value_matcher, 'key_2' : other_value_matcher})
has_entries(key=value_matcher, key_2=other_value_matcher)
- Describe Unicode strings by their __repr__. Thanks to: Sebastian Arming
- Rewrote documentation. (Jon Reid)

1.5

-----------

29 Apr 2011

* Packaging:
- Python 3.1 support. Thanks to: Chris Rose
- Easier installation with bootstrapping. Thanks to: Chris Rose

* Mock integration:
- "match_equality" wraps a matcher to define equality in terms of satisfying the matcher. This allows Hamcrest matchers to be used in libraries that are not Hamcrest-aware, such as Michael Foord's mock library. Thanks to: Chris Rose

* New matcher:
- "string_contains_in_order" matches string containing given list of substrings, in order. Thanks to: Romilly Cocking

* Improved matchers:
- For consistency, changed "any_of" and "all_of" to implicitly wrap non-matcher values in EqualTo. Thanks to: Chris Rose
- Changed "sameInstance" mismatch description to omit address when describing None.

1.4

-----------

13 Feb 2011

* New matchers:
- "has_entries" matches dictionary containing key-value pairs satisfying a given list of alternating keys and value matchers.

* "assert_that" can be invoked with a single boolean argument; the reason message is now optional. This is a convenience replacement for assertTrue. Thanks to: Jeong-Min Lee

* Improved descriptions:
- Reverted 1.3 change: Describe None as "<None>" after all, since it is an object.
- "``is_``" no longer says "is ..." in its description, but just lets the inner description pass through.
- Consistently use articles to begin descriptions, such as "a sequence containing" instead of "sequence containing".

1.3

-----------

04 Feb 2011

* PyHamcrest is now compatible with Python 3! To install PyHamcrest on Python 3:
- Install the "distribute" package, http://pypi.python.org/pypi/distribute
- Run "python3 setup.py install"
Unit tests are not converted by the install procedure. Run "2to3 -nw ." separately to convert them. You may discover import statements in the __init__.py files (and one in core/base_description.py) that need dot prefixes.
Thanks to: Jeong-Min Lee

* Improved descriptions and mismatch descriptions of several matchers, including:
- Fixed "contains" and "contains_inanyorder" to describe mismatch if item is not a sequence.
- Fixed "described_as" to use nested matcher to generate mismatch description.
- "same_instance" is more readable, and includes object memory addresses.
- If object has a length, "has_length" mismatch describes actual length.
- Describe None as "None" instead of "<None>".
- Don't wrap angle brackets around a description that already has them.
- Improved readability of several matchers.

1.2.1

- Corrected manifest so install works. Thanks to: Jeong-Min Lee

1.1

-----------

28 Dec 2010

* New matchers:
- "contains" matches sequence containing matching items in order.
- "contains_inanyorder" matches sequence containing matching items in any order.

* Added Sphinx documentation support.

Page 4 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.