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 /contrib/python | |
parent | e62a28e708a9c85b312652ff618f8a64d17b2dbc (diff) | |
download | ydb-35cc60add498c5117afaf31bef949ac7e281b182.tar.gz |
intermediate changes
ref:17a230a3419e9a5f0286356df636f0071dc757b6
Diffstat (limited to 'contrib/python')
-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 |
60 files changed, 115 insertions, 63 deletions
diff --git a/contrib/python/PyHamcrest/src/hamcrest/__init__.py b/contrib/python/PyHamcrest/hamcrest/__init__.py index 3a751d44f62..3a751d44f62 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 779fa723459..779fa723459 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 b38bc243ca0..b38bc243ca0 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 8c7c51364de..8c7c51364de 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 951e2a7b95d..951e2a7b95d 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 2c6d1fa74c8..2c6d1fa74c8 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 38e93e249a7..38e93e249a7 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 35c5d0bfeb6..35c5d0bfeb6 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 7a2bfc6627d..7a2bfc6627d 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 93b4d6ac458..93b4d6ac458 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 ba11a762aeb..ba11a762aeb 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 f916811bc97..f916811bc97 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 119fd58a482..119fd58a482 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 f8eb4a2fd10..f8eb4a2fd10 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 511fd5ae461..511fd5ae461 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 7567e6f325d..7567e6f325d 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 b1f85427d7a..b1f85427d7a 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 878e2af87aa..16614cc1b77 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 6201b7f70f9..6201b7f70f9 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 61cb82d43b5..61cb82d43b5 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 a1f3bfb1549..a1f3bfb1549 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 a5b506fb395..a5b506fb395 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 81ee27c6d9d..81ee27c6d9d 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 e77b0e0fdb6..e77b0e0fdb6 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 dfa4e3a20e4..dfa4e3a20e4 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 7626bf91e8e..7626bf91e8e 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 a5a7963521f..a5a7963521f 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 2f899877883..2f899877883 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 bc99b633730..bc99b633730 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 95281973fb5..95281973fb5 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 eb83ade52de..eb83ade52de 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 ccb51e6396d..ccb51e6396d 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 e5288841b26..e5288841b26 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 87962a2474b..87962a2474b 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 21939b3f3f3..21939b3f3f3 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 78e2b006fcc..78e2b006fcc 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 3fd91a6c925..3fd91a6c925 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 bd52c10419e..bd52c10419e 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 cc1e1321635..cc1e1321635 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 52da0547605..52da0547605 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 5087faf8468..5087faf8468 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 e401615e356..e401615e356 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 c3c75f425d6..c3c75f425d6 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 5ca45566616..5ca45566616 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 3ef0ab5b81e..3ef0ab5b81e 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 d2536d69f40..d2536d69f40 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 8b50547e21c..8b50547e21c 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 39d0e8b3822..39d0e8b3822 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 d1ee2d17fc3..d1ee2d17fc3 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 86fa997601b..86fa997601b 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 58ffd283c66..58ffd283c66 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 516b1043ab2..516b1043ab2 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 43f9c3d3021..43f9c3d3021 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 2a16e29729b..2a16e29729b 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 a0af49c9c2a..a0af49c9c2a 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 63ea359a51c..63ea359a51c 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 00000000000..9e8a36de14d --- /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 00000000000..f5164f66a08 --- /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 4c9ff4e040e..00000000000 --- 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 40cbdd226eb..00000000000 --- 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)) |