/usr/lib/python3/dist-packages/hamcrest/core/selfdescribingvalue.py is in python3-hamcrest 1.8.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | from hamcrest.core.selfdescribing import SelfDescribing
import warnings
__author__ = "Jon Reid"
__copyright__ = "Copyright 2011 hamcrest.org"
__license__ = "BSD, see License.txt"
class SelfDescribingValue(SelfDescribing):
"""Wrap any value in a ``SelfDescribingValue`` to satisfy the
:py:class:`~hamcrest.core.selfdescribing.SelfDescribing` interface.
**Deprecated:** No need for this class now that
:py:meth:`~hamcrest.core.description.Description.append_description_of`
handles any type of value.
"""
def __init__(self, value):
warnings.warn('SelfDescribingValue no longer needed',
DeprecationWarning)
self.value = value
def describe_to(self, description):
"""Generates a description of the value."""
description.append_value(self.value)
|