/usr/lib/python3/dist-packages/hamcrest/library/text
NameSizeModeActions
__pycache__/-0755rm
isequal_ignoring_case.py12570644editdlrm
isequal_ignoring_whitespace.py16670644editdlrm
stringcontains.py9530644editdlrm
stringcontainsinorder.py17050644editdlrm
stringendswith.py9800644editdlrm
stringmatches.py11510644editdlrm
stringstartswith.py10070644editdlrm
substringmatcher.py6950644editdlrm
__init__.py5480644editdlrm
Edit: /usr/lib/python3/dist-packages/hamcrest/library/text/substringmatcher.py (695B)
__author__ = "Jon Reid" __copyright__ = "Copyright 2011 hamcrest.org" __license__ = "BSD, see License.txt" from hamcrest.core.base_matcher import BaseMatcher import six class SubstringMatcher(BaseMatcher): def __init__(self, substring): if not isinstance(substring, six.string_types): raise TypeError(self.__class__.__name__ + ' requires string') self.substring = substring def describe_to(self, description): description.append_text('a string ') \ .append_text(self.relationship()) \ .append_text(' ') \ .append_description_of(self.substring)