def _validate_with_metadata(self, obj, name, value, src_units):

        # pylint: disable=E1101
        dst_units = self.units

        try:
            pq = PhysicalQuantity(1.0, src_units)
        except NameError:
            raise NameError("while setting value of %s: undefined unit '%s'" %
                            (src_units, name))

        try:
            pq.convert_to_unit(dst_units)
        except NameError:
            raise NameError("undefined unit '%s' for variable '%s'" %
                            (dst_units, name))
        except TypeError:
            msg = "%s: units '%s' are incompatible " % (name, src_units) + \
                   "with assigning units of '%s'" % (dst_units)
            raise TypeError(msg)

        value *= pq.value

        return value
Testing search with private review requests without access to
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.main/src/openmdao/main/datatypes/array.py/Array._validate_with_metadata--crossover with--dataset/ETHPy150Open reviewboard/reviewboard/reviewboard/search/tests.py/SearchTests.test_review_requests_with_private_group_and_target_people