diff options
author | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-05-24 19:39:36 +0300 |
---|---|---|
committer | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-05-24 19:39:36 +0300 |
commit | 35cc60add498c5117afaf31bef949ac7e281b182 (patch) | |
tree | 1071310c216b15ea4bc9c5037cc964d9e06db692 | |
parent | e62a28e708a9c85b312652ff618f8a64d17b2dbc (diff) | |
download | ydb-35cc60add498c5117afaf31bef949ac7e281b182.tar.gz |
intermediate changes
ref:17a230a3419e9a5f0286356df636f0071dc757b6
-rw-r--r-- | build/ya.conf.json | 4 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/__init__.py (renamed from contrib/python/PyHamcrest/src/hamcrest/__init__.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/core/__init__.py (renamed from contrib/python/PyHamcrest/src/hamcrest/core/__init__.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/core/assert_that.py (renamed from contrib/python/PyHamcrest/src/hamcrest/core/assert_that.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/core/base_description.py (renamed from contrib/python/PyHamcrest/src/hamcrest/core/base_description.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/core/base_matcher.py (renamed from contrib/python/PyHamcrest/src/hamcrest/core/base_matcher.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/core/compat.py (renamed from contrib/python/PyHamcrest/src/hamcrest/core/compat.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/core/core/__init__.py (renamed from contrib/python/PyHamcrest/src/hamcrest/core/core/__init__.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/core/core/allof.py (renamed from contrib/python/PyHamcrest/src/hamcrest/core/core/allof.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/core/core/anyof.py (renamed from contrib/python/PyHamcrest/src/hamcrest/core/core/anyof.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/core/core/described_as.py (renamed from contrib/python/PyHamcrest/src/hamcrest/core/core/described_as.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/core/core/is_.py (renamed from contrib/python/PyHamcrest/src/hamcrest/core/core/is_.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/core/core/isanything.py (renamed from contrib/python/PyHamcrest/src/hamcrest/core/core/isanything.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/core/core/isequal.py (renamed from contrib/python/PyHamcrest/src/hamcrest/core/core/isequal.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/core/core/isinstanceof.py (renamed from contrib/python/PyHamcrest/src/hamcrest/core/core/isinstanceof.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/core/core/isnone.py (renamed from contrib/python/PyHamcrest/src/hamcrest/core/core/isnone.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/core/core/isnot.py (renamed from contrib/python/PyHamcrest/src/hamcrest/core/core/isnot.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/core/core/issame.py (renamed from contrib/python/PyHamcrest/src/hamcrest/core/core/issame.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/core/core/raises.py (renamed from contrib/python/PyHamcrest/src/hamcrest/core/core/raises.py) | 1 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/core/description.py (renamed from contrib/python/PyHamcrest/src/hamcrest/core/description.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/core/helpers/__init__.py (renamed from contrib/python/PyHamcrest/src/hamcrest/core/helpers/__init__.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/core/helpers/hasmethod.py (renamed from contrib/python/PyHamcrest/src/hamcrest/core/helpers/hasmethod.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/core/helpers/wrap_matcher.py (renamed from contrib/python/PyHamcrest/src/hamcrest/core/helpers/wrap_matcher.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/core/matcher.py (renamed from contrib/python/PyHamcrest/src/hamcrest/core/matcher.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/core/selfdescribing.py (renamed from contrib/python/PyHamcrest/src/hamcrest/core/selfdescribing.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/core/selfdescribingvalue.py (renamed from contrib/python/PyHamcrest/src/hamcrest/core/selfdescribingvalue.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/core/string_description.py (renamed from contrib/python/PyHamcrest/src/hamcrest/core/string_description.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/library/__init__.py (renamed from contrib/python/PyHamcrest/src/hamcrest/library/__init__.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/library/collection/__init__.py (renamed from contrib/python/PyHamcrest/src/hamcrest/library/collection/__init__.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/library/collection/is_empty.py (renamed from contrib/python/PyHamcrest/src/hamcrest/library/collection/is_empty.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/library/collection/isdict_containing.py (renamed from contrib/python/PyHamcrest/src/hamcrest/library/collection/isdict_containing.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/library/collection/isdict_containingentries.py (renamed from contrib/python/PyHamcrest/src/hamcrest/library/collection/isdict_containingentries.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/library/collection/isdict_containingkey.py (renamed from contrib/python/PyHamcrest/src/hamcrest/library/collection/isdict_containingkey.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/library/collection/isdict_containingvalue.py (renamed from contrib/python/PyHamcrest/src/hamcrest/library/collection/isdict_containingvalue.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/library/collection/isin.py (renamed from contrib/python/PyHamcrest/src/hamcrest/library/collection/isin.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/library/collection/issequence_containing.py (renamed from contrib/python/PyHamcrest/src/hamcrest/library/collection/issequence_containing.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/library/collection/issequence_containinginanyorder.py (renamed from contrib/python/PyHamcrest/src/hamcrest/library/collection/issequence_containinginanyorder.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/library/collection/issequence_containinginorder.py (renamed from contrib/python/PyHamcrest/src/hamcrest/library/collection/issequence_containinginorder.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/library/collection/issequence_onlycontaining.py (renamed from contrib/python/PyHamcrest/src/hamcrest/library/collection/issequence_onlycontaining.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/library/integration/__init__.py (renamed from contrib/python/PyHamcrest/src/hamcrest/library/integration/__init__.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/library/integration/match_equality.py (renamed from contrib/python/PyHamcrest/src/hamcrest/library/integration/match_equality.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/library/number/__init__.py (renamed from contrib/python/PyHamcrest/src/hamcrest/library/number/__init__.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/library/number/iscloseto.py (renamed from contrib/python/PyHamcrest/src/hamcrest/library/number/iscloseto.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/library/number/ordering_comparison.py (renamed from contrib/python/PyHamcrest/src/hamcrest/library/number/ordering_comparison.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/library/object/__init__.py (renamed from contrib/python/PyHamcrest/src/hamcrest/library/object/__init__.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/library/object/haslength.py (renamed from contrib/python/PyHamcrest/src/hamcrest/library/object/haslength.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/library/object/hasproperty.py (renamed from contrib/python/PyHamcrest/src/hamcrest/library/object/hasproperty.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/library/object/hasstring.py (renamed from contrib/python/PyHamcrest/src/hamcrest/library/object/hasstring.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/library/text/__init__.py (renamed from contrib/python/PyHamcrest/src/hamcrest/library/text/__init__.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/library/text/isequal_ignoring_case.py (renamed from contrib/python/PyHamcrest/src/hamcrest/library/text/isequal_ignoring_case.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/library/text/isequal_ignoring_whitespace.py (renamed from contrib/python/PyHamcrest/src/hamcrest/library/text/isequal_ignoring_whitespace.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/library/text/stringcontains.py (renamed from contrib/python/PyHamcrest/src/hamcrest/library/text/stringcontains.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/library/text/stringcontainsinorder.py (renamed from contrib/python/PyHamcrest/src/hamcrest/library/text/stringcontainsinorder.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/library/text/stringendswith.py (renamed from contrib/python/PyHamcrest/src/hamcrest/library/text/stringendswith.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/library/text/stringmatches.py (renamed from contrib/python/PyHamcrest/src/hamcrest/library/text/stringmatches.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/library/text/stringstartswith.py (renamed from contrib/python/PyHamcrest/src/hamcrest/library/text/stringstartswith.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/hamcrest/library/text/substringmatcher.py (renamed from contrib/python/PyHamcrest/src/hamcrest/library/text/substringmatcher.py) | 0 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/patches/01-speedup.patch | 28 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/patches/02-add-additional-matcher.patch | 87 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/tests/test_raises.py | 45 | ||||
-rw-r--r-- | contrib/python/PyHamcrest/tests/test_string_description.py | 17 |
61 files changed, 117 insertions, 65 deletions
diff --git a/build/ya.conf.json b/build/ya.conf.json index 4c650b2c54..1681ea93b2 100644 --- a/build/ya.conf.json +++ b/build/ya.conf.json @@ -8617,8 +8617,8 @@ "sedem": { "formula": { "sandbox_id": [ - 1314698916, - 1314698920 + 1319416201, + 1319416204 ], "match": "bin/sedem" }, diff --git a/contrib/python/PyHamcrest/src/hamcrest/__init__.py b/contrib/python/PyHamcrest/hamcrest/__init__.py index 3a751d44f6..3a751d44f6 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/__init__.py +++ b/contrib/python/PyHamcrest/hamcrest/__init__.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/core/__init__.py b/contrib/python/PyHamcrest/hamcrest/core/__init__.py index 779fa72345..779fa72345 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/core/__init__.py +++ b/contrib/python/PyHamcrest/hamcrest/core/__init__.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/core/assert_that.py b/contrib/python/PyHamcrest/hamcrest/core/assert_that.py index b38bc243ca..b38bc243ca 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/core/assert_that.py +++ b/contrib/python/PyHamcrest/hamcrest/core/assert_that.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/core/base_description.py b/contrib/python/PyHamcrest/hamcrest/core/base_description.py index 8c7c51364d..8c7c51364d 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/core/base_description.py +++ b/contrib/python/PyHamcrest/hamcrest/core/base_description.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/core/base_matcher.py b/contrib/python/PyHamcrest/hamcrest/core/base_matcher.py index 951e2a7b95..951e2a7b95 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/core/base_matcher.py +++ b/contrib/python/PyHamcrest/hamcrest/core/base_matcher.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/core/compat.py b/contrib/python/PyHamcrest/hamcrest/core/compat.py index 2c6d1fa74c..2c6d1fa74c 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/core/compat.py +++ b/contrib/python/PyHamcrest/hamcrest/core/compat.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/core/core/__init__.py b/contrib/python/PyHamcrest/hamcrest/core/core/__init__.py index 38e93e249a..38e93e249a 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/core/core/__init__.py +++ b/contrib/python/PyHamcrest/hamcrest/core/core/__init__.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/core/core/allof.py b/contrib/python/PyHamcrest/hamcrest/core/core/allof.py index 35c5d0bfeb..35c5d0bfeb 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/core/core/allof.py +++ b/contrib/python/PyHamcrest/hamcrest/core/core/allof.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/core/core/anyof.py b/contrib/python/PyHamcrest/hamcrest/core/core/anyof.py index 7a2bfc6627..7a2bfc6627 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/core/core/anyof.py +++ b/contrib/python/PyHamcrest/hamcrest/core/core/anyof.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/core/core/described_as.py b/contrib/python/PyHamcrest/hamcrest/core/core/described_as.py index 93b4d6ac45..93b4d6ac45 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/core/core/described_as.py +++ b/contrib/python/PyHamcrest/hamcrest/core/core/described_as.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/core/core/is_.py b/contrib/python/PyHamcrest/hamcrest/core/core/is_.py index ba11a762ae..ba11a762ae 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/core/core/is_.py +++ b/contrib/python/PyHamcrest/hamcrest/core/core/is_.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/core/core/isanything.py b/contrib/python/PyHamcrest/hamcrest/core/core/isanything.py index f916811bc9..f916811bc9 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/core/core/isanything.py +++ b/contrib/python/PyHamcrest/hamcrest/core/core/isanything.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/core/core/isequal.py b/contrib/python/PyHamcrest/hamcrest/core/core/isequal.py index 119fd58a48..119fd58a48 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/core/core/isequal.py +++ b/contrib/python/PyHamcrest/hamcrest/core/core/isequal.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/core/core/isinstanceof.py b/contrib/python/PyHamcrest/hamcrest/core/core/isinstanceof.py index f8eb4a2fd1..f8eb4a2fd1 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/core/core/isinstanceof.py +++ b/contrib/python/PyHamcrest/hamcrest/core/core/isinstanceof.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/core/core/isnone.py b/contrib/python/PyHamcrest/hamcrest/core/core/isnone.py index 511fd5ae46..511fd5ae46 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/core/core/isnone.py +++ b/contrib/python/PyHamcrest/hamcrest/core/core/isnone.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/core/core/isnot.py b/contrib/python/PyHamcrest/hamcrest/core/core/isnot.py index 7567e6f325..7567e6f325 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/core/core/isnot.py +++ b/contrib/python/PyHamcrest/hamcrest/core/core/isnot.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/core/core/issame.py b/contrib/python/PyHamcrest/hamcrest/core/core/issame.py index b1f85427d7..b1f85427d7 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/core/core/issame.py +++ b/contrib/python/PyHamcrest/hamcrest/core/core/issame.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/core/core/raises.py b/contrib/python/PyHamcrest/hamcrest/core/core/raises.py index 878e2af87a..16614cc1b7 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/core/core/raises.py +++ b/contrib/python/PyHamcrest/hamcrest/core/core/raises.py @@ -2,7 +2,6 @@ from weakref import ref import re import sys from hamcrest.core.base_matcher import BaseMatcher -from hamcrest.core.helpers.wrap_matcher import wrap_matcher from hamcrest.core.compat import is_callable __author__ = "Per Fagrell" diff --git a/contrib/python/PyHamcrest/src/hamcrest/core/description.py b/contrib/python/PyHamcrest/hamcrest/core/description.py index 6201b7f70f..6201b7f70f 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/core/description.py +++ b/contrib/python/PyHamcrest/hamcrest/core/description.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/core/helpers/__init__.py b/contrib/python/PyHamcrest/hamcrest/core/helpers/__init__.py index 61cb82d43b..61cb82d43b 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/core/helpers/__init__.py +++ b/contrib/python/PyHamcrest/hamcrest/core/helpers/__init__.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/core/helpers/hasmethod.py b/contrib/python/PyHamcrest/hamcrest/core/helpers/hasmethod.py index a1f3bfb154..a1f3bfb154 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/core/helpers/hasmethod.py +++ b/contrib/python/PyHamcrest/hamcrest/core/helpers/hasmethod.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/core/helpers/wrap_matcher.py b/contrib/python/PyHamcrest/hamcrest/core/helpers/wrap_matcher.py index a5b506fb39..a5b506fb39 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/core/helpers/wrap_matcher.py +++ b/contrib/python/PyHamcrest/hamcrest/core/helpers/wrap_matcher.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/core/matcher.py b/contrib/python/PyHamcrest/hamcrest/core/matcher.py index 81ee27c6d9..81ee27c6d9 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/core/matcher.py +++ b/contrib/python/PyHamcrest/hamcrest/core/matcher.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/core/selfdescribing.py b/contrib/python/PyHamcrest/hamcrest/core/selfdescribing.py index e77b0e0fdb..e77b0e0fdb 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/core/selfdescribing.py +++ b/contrib/python/PyHamcrest/hamcrest/core/selfdescribing.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/core/selfdescribingvalue.py b/contrib/python/PyHamcrest/hamcrest/core/selfdescribingvalue.py index dfa4e3a20e..dfa4e3a20e 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/core/selfdescribingvalue.py +++ b/contrib/python/PyHamcrest/hamcrest/core/selfdescribingvalue.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/core/string_description.py b/contrib/python/PyHamcrest/hamcrest/core/string_description.py index 7626bf91e8..7626bf91e8 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/core/string_description.py +++ b/contrib/python/PyHamcrest/hamcrest/core/string_description.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/library/__init__.py b/contrib/python/PyHamcrest/hamcrest/library/__init__.py index a5a7963521..a5a7963521 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/library/__init__.py +++ b/contrib/python/PyHamcrest/hamcrest/library/__init__.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/library/collection/__init__.py b/contrib/python/PyHamcrest/hamcrest/library/collection/__init__.py index 2f89987788..2f89987788 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/library/collection/__init__.py +++ b/contrib/python/PyHamcrest/hamcrest/library/collection/__init__.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/library/collection/is_empty.py b/contrib/python/PyHamcrest/hamcrest/library/collection/is_empty.py index bc99b63373..bc99b63373 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/library/collection/is_empty.py +++ b/contrib/python/PyHamcrest/hamcrest/library/collection/is_empty.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/library/collection/isdict_containing.py b/contrib/python/PyHamcrest/hamcrest/library/collection/isdict_containing.py index 95281973fb..95281973fb 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/library/collection/isdict_containing.py +++ b/contrib/python/PyHamcrest/hamcrest/library/collection/isdict_containing.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/library/collection/isdict_containingentries.py b/contrib/python/PyHamcrest/hamcrest/library/collection/isdict_containingentries.py index eb83ade52d..eb83ade52d 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/library/collection/isdict_containingentries.py +++ b/contrib/python/PyHamcrest/hamcrest/library/collection/isdict_containingentries.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/library/collection/isdict_containingkey.py b/contrib/python/PyHamcrest/hamcrest/library/collection/isdict_containingkey.py index ccb51e6396..ccb51e6396 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/library/collection/isdict_containingkey.py +++ b/contrib/python/PyHamcrest/hamcrest/library/collection/isdict_containingkey.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/library/collection/isdict_containingvalue.py b/contrib/python/PyHamcrest/hamcrest/library/collection/isdict_containingvalue.py index e5288841b2..e5288841b2 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/library/collection/isdict_containingvalue.py +++ b/contrib/python/PyHamcrest/hamcrest/library/collection/isdict_containingvalue.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/library/collection/isin.py b/contrib/python/PyHamcrest/hamcrest/library/collection/isin.py index 87962a2474..87962a2474 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/library/collection/isin.py +++ b/contrib/python/PyHamcrest/hamcrest/library/collection/isin.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/library/collection/issequence_containing.py b/contrib/python/PyHamcrest/hamcrest/library/collection/issequence_containing.py index 21939b3f3f..21939b3f3f 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/library/collection/issequence_containing.py +++ b/contrib/python/PyHamcrest/hamcrest/library/collection/issequence_containing.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/library/collection/issequence_containinginanyorder.py b/contrib/python/PyHamcrest/hamcrest/library/collection/issequence_containinginanyorder.py index 78e2b006fc..78e2b006fc 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/library/collection/issequence_containinginanyorder.py +++ b/contrib/python/PyHamcrest/hamcrest/library/collection/issequence_containinginanyorder.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/library/collection/issequence_containinginorder.py b/contrib/python/PyHamcrest/hamcrest/library/collection/issequence_containinginorder.py index 3fd91a6c92..3fd91a6c92 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/library/collection/issequence_containinginorder.py +++ b/contrib/python/PyHamcrest/hamcrest/library/collection/issequence_containinginorder.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/library/collection/issequence_onlycontaining.py b/contrib/python/PyHamcrest/hamcrest/library/collection/issequence_onlycontaining.py index bd52c10419..bd52c10419 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/library/collection/issequence_onlycontaining.py +++ b/contrib/python/PyHamcrest/hamcrest/library/collection/issequence_onlycontaining.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/library/integration/__init__.py b/contrib/python/PyHamcrest/hamcrest/library/integration/__init__.py index cc1e132163..cc1e132163 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/library/integration/__init__.py +++ b/contrib/python/PyHamcrest/hamcrest/library/integration/__init__.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/library/integration/match_equality.py b/contrib/python/PyHamcrest/hamcrest/library/integration/match_equality.py index 52da054760..52da054760 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/library/integration/match_equality.py +++ b/contrib/python/PyHamcrest/hamcrest/library/integration/match_equality.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/library/number/__init__.py b/contrib/python/PyHamcrest/hamcrest/library/number/__init__.py index 5087faf846..5087faf846 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/library/number/__init__.py +++ b/contrib/python/PyHamcrest/hamcrest/library/number/__init__.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/library/number/iscloseto.py b/contrib/python/PyHamcrest/hamcrest/library/number/iscloseto.py index e401615e35..e401615e35 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/library/number/iscloseto.py +++ b/contrib/python/PyHamcrest/hamcrest/library/number/iscloseto.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/library/number/ordering_comparison.py b/contrib/python/PyHamcrest/hamcrest/library/number/ordering_comparison.py index c3c75f425d..c3c75f425d 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/library/number/ordering_comparison.py +++ b/contrib/python/PyHamcrest/hamcrest/library/number/ordering_comparison.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/library/object/__init__.py b/contrib/python/PyHamcrest/hamcrest/library/object/__init__.py index 5ca4556661..5ca4556661 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/library/object/__init__.py +++ b/contrib/python/PyHamcrest/hamcrest/library/object/__init__.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/library/object/haslength.py b/contrib/python/PyHamcrest/hamcrest/library/object/haslength.py index 3ef0ab5b81..3ef0ab5b81 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/library/object/haslength.py +++ b/contrib/python/PyHamcrest/hamcrest/library/object/haslength.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/library/object/hasproperty.py b/contrib/python/PyHamcrest/hamcrest/library/object/hasproperty.py index d2536d69f4..d2536d69f4 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/library/object/hasproperty.py +++ b/contrib/python/PyHamcrest/hamcrest/library/object/hasproperty.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/library/object/hasstring.py b/contrib/python/PyHamcrest/hamcrest/library/object/hasstring.py index 8b50547e21..8b50547e21 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/library/object/hasstring.py +++ b/contrib/python/PyHamcrest/hamcrest/library/object/hasstring.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/library/text/__init__.py b/contrib/python/PyHamcrest/hamcrest/library/text/__init__.py index 39d0e8b382..39d0e8b382 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/library/text/__init__.py +++ b/contrib/python/PyHamcrest/hamcrest/library/text/__init__.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/library/text/isequal_ignoring_case.py b/contrib/python/PyHamcrest/hamcrest/library/text/isequal_ignoring_case.py index d1ee2d17fc..d1ee2d17fc 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/library/text/isequal_ignoring_case.py +++ b/contrib/python/PyHamcrest/hamcrest/library/text/isequal_ignoring_case.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/library/text/isequal_ignoring_whitespace.py b/contrib/python/PyHamcrest/hamcrest/library/text/isequal_ignoring_whitespace.py index 86fa997601..86fa997601 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/library/text/isequal_ignoring_whitespace.py +++ b/contrib/python/PyHamcrest/hamcrest/library/text/isequal_ignoring_whitespace.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/library/text/stringcontains.py b/contrib/python/PyHamcrest/hamcrest/library/text/stringcontains.py index 58ffd283c6..58ffd283c6 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/library/text/stringcontains.py +++ b/contrib/python/PyHamcrest/hamcrest/library/text/stringcontains.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/library/text/stringcontainsinorder.py b/contrib/python/PyHamcrest/hamcrest/library/text/stringcontainsinorder.py index 516b1043ab..516b1043ab 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/library/text/stringcontainsinorder.py +++ b/contrib/python/PyHamcrest/hamcrest/library/text/stringcontainsinorder.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/library/text/stringendswith.py b/contrib/python/PyHamcrest/hamcrest/library/text/stringendswith.py index 43f9c3d302..43f9c3d302 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/library/text/stringendswith.py +++ b/contrib/python/PyHamcrest/hamcrest/library/text/stringendswith.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/library/text/stringmatches.py b/contrib/python/PyHamcrest/hamcrest/library/text/stringmatches.py index 2a16e29729..2a16e29729 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/library/text/stringmatches.py +++ b/contrib/python/PyHamcrest/hamcrest/library/text/stringmatches.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/library/text/stringstartswith.py b/contrib/python/PyHamcrest/hamcrest/library/text/stringstartswith.py index a0af49c9c2..a0af49c9c2 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/library/text/stringstartswith.py +++ b/contrib/python/PyHamcrest/hamcrest/library/text/stringstartswith.py diff --git a/contrib/python/PyHamcrest/src/hamcrest/library/text/substringmatcher.py b/contrib/python/PyHamcrest/hamcrest/library/text/substringmatcher.py index 63ea359a51..63ea359a51 100644 --- a/contrib/python/PyHamcrest/src/hamcrest/library/text/substringmatcher.py +++ b/contrib/python/PyHamcrest/hamcrest/library/text/substringmatcher.py diff --git a/contrib/python/PyHamcrest/patches/01-speedup.patch b/contrib/python/PyHamcrest/patches/01-speedup.patch new file mode 100644 index 0000000000..9e8a36de14 --- /dev/null +++ b/contrib/python/PyHamcrest/patches/01-speedup.patch @@ -0,0 +1,28 @@ +commit 4dc0f71a2788ed3530b053c0363738a8964f6a86 +author: asatarin +date: 2017-10-13T16:14:43+03:00 +revision: 3199619 + + REVIEW:340199 Speed up StringDescription + +--- contrib/python/PyHamcrest/hamcrest/core/string_description.py (94523234ff338f573e50b70f8cf7f6c8456bd3a1) ++++ contrib/python/PyHamcrest/hamcrest/core/string_description.py (4dc0f71a2788ed3530b053c0363738a8964f6a86) +@@ -24,15 +24,14 @@ def tostring(selfdescribing): + class StringDescription(BaseDescription): + """A :py:class:`~hamcrest.core.description.Description` that is stored as a + string. +- + """ + + def __init__(self): +- self.out = '' ++ self.__out_list = [] + + def __str__(self): + """Returns the description.""" +- return self.out ++ return ''.join(self.__out_list) + + def append(self, string): +- self.out += six.text_type(string) ++ self.__out_list.append(six.text_type(string)) diff --git a/contrib/python/PyHamcrest/patches/02-add-additional-matcher.patch b/contrib/python/PyHamcrest/patches/02-add-additional-matcher.patch new file mode 100644 index 0000000000..f5164f66a0 --- /dev/null +++ b/contrib/python/PyHamcrest/patches/02-add-additional-matcher.patch @@ -0,0 +1,87 @@ +commit d2cd9189374434ea6603b07c67b316c59e6d689f +author: asatarin +date: 2017-06-13T11:54:11+03:00 +revision: 2945097 + + REVIEW:285653 Add additional capabilities to standard raises() matcher + +--- contrib/python/PyHamcrest/hamcrest/core/core/raises.py (f026926efe42aecf93ac9fb70955b96fbdb35a67) ++++ contrib/python/PyHamcrest/hamcrest/core/core/raises.py (d2cd9189374434ea6603b07c67b316c59e6d689f) +@@ -10,11 +10,13 @@ __license__ = "BSD, see License.txt" + + + class Raises(BaseMatcher): +- def __init__(self, expected, pattern=None): ++ def __init__(self, expected, pattern=None, matcher=None): + self.pattern = pattern + self.expected = expected + self.actual = None + self.function = None ++ self.matcher = matcher ++ self.actual_return_value = None + + def _matches(self, function): + if not is_callable(function): +@@ -26,18 +28,24 @@ class Raises(BaseMatcher): + def _call_function(self, function): + self.actual = None + try: +- function() ++ self.actual_return_value = function() + except Exception: + self.actual = sys.exc_info()[1] + + if isinstance(self.actual, self.expected): + if self.pattern is not None: +- return re.search(self.pattern, str(self.actual)) is not None +- return True ++ return ( ++ re.search(self.pattern, str(self.actual)) is not None ++ and (self.matcher is None or self.matcher.matches(self.actual)) ++ ) ++ return self.matcher is None or self.matcher.matches(self.actual) + return False + + def describe_to(self, description): + description.append_text('Expected a callable raising %s' % self.expected) ++ if self.matcher is not None: ++ description.append_text("\n and ") ++ description.append_description_of(self.matcher) + + def describe_mismatch(self, item, description): + if not is_callable(item): +@@ -51,15 +59,20 @@ class Raises(BaseMatcher): + return + + if self.actual is None: +- description.append_text('No exception raised.') +- elif isinstance(self.actual, self.expected) and self.pattern is not None: +- description.append_text('Correct assertion type raised, but the expected pattern ("%s") not found.' % self.pattern) +- description.append_text('\n message was: "%s"' % str(self.actual)) ++ description.append_text('No exception raised and actual return value = ') ++ description.append_value(self.actual_return_value) ++ elif isinstance(self.actual, self.expected): ++ if self.pattern is not None: ++ description.append_text('Correct assertion type raised, but the expected pattern ("%s") not found.' % self.pattern) ++ description.append_text('\n message was: "%s"' % str(self.actual)) ++ if self.matcher is not None: ++ description.append_text("\nAdditional exception matcher: ") ++ self.matcher.describe_mismatch(self.actual, description) + else: + description.append_text('%s was raised instead' % type(self.actual)) + + +-def raises(exception, pattern=None): ++def raises(exception, pattern=None, matcher=None): + """Matches if the called function raised the expected exception. + + :param exception: The class of the expected exception +@@ -75,7 +88,7 @@ def raises(exception, pattern=None): + assert_that(calling(int).with_args('q'), raises(TypeError)) + assert_that(calling(parse, broken_input), raises(ValueError)) + """ +- return Raises(exception, pattern) ++ return Raises(exception, pattern, matcher) + + + class DeferredCallable(object): diff --git a/contrib/python/PyHamcrest/tests/test_raises.py b/contrib/python/PyHamcrest/tests/test_raises.py deleted file mode 100644 index 4c9ff4e040..0000000000 --- a/contrib/python/PyHamcrest/tests/test_raises.py +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - - -__author__ = 'asatarin@yandex-team.ru' - - -class TestException(RuntimeError): - def __init__(self, *args, **kwargs): - super(TestException, self).__init__(*args, **kwargs) - self.prop = "property" - - -def raises_exception(): - raise TestException() - - -def returns_value(): - return 'my_return_value' - - -def test_raises(): - """ - >>> from hamcrest import assert_that - >>> from hamcrest import has_property - >>> from hamcrest import not_, raises - >>> raises(TestException).matches(raises_exception) - True - >>> raises(TestException, matcher=has_property("prop", "property")).matches(raises_exception) - True - >>> raises(TestException, matcher=has_property("prop", "fail")).matches(raises_exception) - False - >>> raises(TestException, matcher=not_(has_property("prop", "fail"))).matches(raises_exception) - True - >>> raises(TestException, matcher=not_(has_property("prop", "property"))).matches(raises_exception) - False - - >>> assert_that(returns_value, raises(TestException), 'message') - Traceback (most recent call last): - ... - AssertionError: message - Expected: Expected a callable raising <class '__tests__.test_raises.TestException'> - but: No exception raised and actual return value = 'my_return_value' - <BLANKLINE> - """ diff --git a/contrib/python/PyHamcrest/tests/test_string_description.py b/contrib/python/PyHamcrest/tests/test_string_description.py deleted file mode 100644 index 40cbdd226e..0000000000 --- a/contrib/python/PyHamcrest/tests/test_string_description.py +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -from hamcrest import assert_that, empty, equal_to - -__author__ = 'asatarin@yandex-team.ru' - - -def test_string_description_is_fast(): - list_of_very_long_strings = ["aa"*1000 for _ in range(10000)] - try: - assert_that(list_of_very_long_strings, empty()) - x = 0 - except AssertionError as e: - x = len(str(e)) - - assert_that(x, equal_to(20040048)) |