Verify that the box obeys the specifications.
176529
def _validate(self, writing=True):
        """"""
        if any([box.box_id != 'colr' for box in self.box]):
            msg = ("Colour group boxes can only contain colour specification "
                   "boxes.")
            self._dispatch_validation_error(msg, writing=writing)
819594
def is_valid(self):
        
        for spec in self.product_specs:

            for feature in spec.get('mandatory', []):
                if feature.replace('__', '.') not in self.feature_list:
                    self.errors_mandatory.append(feature)

            for feature in spec.get('never', []):
                if feature.replace('__', '.') in self.feature_list:
                    self.errors_never.append(feature)

        return not self.has_errors()
360556
def verify():
    """"""
    verbose = True
    log(
        "Verifying current directory as a Dallinger experiment...",
        delay=0,
        verbose=verbose,
    )
    ok = verify_package(verbose=verbose)
    if ok:
        log("✓ Everything looks good!", delay=0, verbose=verbose)
    else:
        log("☹ Some problems were found.", delay=0, verbose=verbose)
71668
def verify(self, checksum=None, token=None, full_response=False):
        """"""
        payload = {"checksum":checksum, "a":"verify"}
        if token:
            payload.update({"token":token})
        return self.get_shards(Shard(**payload), full_response=True)
1185686
def verify_state(self):
        """"""
        if self.state == CONNECTING:
            self.state = OPEN

            self.conn.on_open(self.conn_info)
764407
def _valid_packet(raw_packet):
        """"""
        if raw_packet[0:1] != b'\xcc':
            return False
        if len(raw_packet) != 19:
            return False
        checksum = 0
        for i in range(1, 17):
            checksum += raw_packet[i]
        if checksum != raw_packet[18]:
            return False
        return True
1227361
def verify(self):
        
        with ffi.OutputString() as outmsg:
            if ffi.lib.LLVMPY_VerifyModule(self, outmsg):
                raise RuntimeError(str(outmsg))
1150346
def _validate(self, writing=False):
        """"""
        for box in self.DR:
            if box.box_id != 'url ':
                msg = ('Child boxes of a data reference box can only be data '
                       'entry URL boxes.')
                self._dispatch_validation_error(msg, writing=writing)
837168
def is_valid(self):
        
        return (
            self.requirement is not None and self.requirement.optional
        ) or bool(self._future_value)
4558
def _validate_jpx_compatibility(self, boxes, compatibility_list):
        
        JPX_IDS = ['asoc', 'nlst']
        jpx_cl = set(compatibility_list)
        for box in boxes:
            if box.box_id in JPX_IDS:
                if len(set(['jpx ', 'jpxb']).intersection(jpx_cl)) == 0:
                    msg = ("A JPX box requires that either 'jpx ' or 'jpxb' "
                           "be present in the ftype compatibility list.")
                    raise RuntimeError(msg)
            if hasattr(box, 'box') != 0:
                # Same set of checks on any child boxes.
                self._validate_jpx_compatibility(box.box, compatibility_list)
1221138
def box_it_up(self):
        
        for k in self:
            _conversion_checks(k, self.keys(), self._box_config,
                               check_only=True)
            if self[k] is not self and hasattr(self[k], 'box_it_up'):
                self[k].box_it_up()
941797
def verify(self, signature, msg):
        '''
        
        '''
        if not self.key:
            return False
        try:
            self.key.verify(signature + msg)
        except ValueError:
            return False
        return True
192600
def verify(path):
        """"""
        valid = False
        try:
            h5 = h5py.File(path, mode="r")
            qpi0 = h5["qpi_0"]
        except (OSError, KeyError):
            pass
        else:
            if ("qpimage version" in qpi0.attrs and
                "phase" in qpi0 and
                "amplitude" in qpi0 and
                "bg_data" in qpi0["phase"] and
                    "bg_data" in qpi0["amplitude"]):
                valid = True
        return valid
985628
def verify(self):
        
        for param in self.longs:
            item = getattr(self, param)
            if not item or isinstance(item, str):
                continue

            if isinstance(item, bytes):
                item = item.decode('utf-8')
                setattr(self, param, item)

            try:
                _ = base64url_to_long(item)
            except Exception:
                return False
            else:
                if [e for e in ['+', '/', '='] if e in item]:
                    return False

        if self.kid:
            if not isinstance(self.kid, str):
                raise ValueError("kid of wrong value type")
        return True
816881
def _verify_validates(self, spec, path):
        """"""
        validates = spec['validates']

        if isinstance(validates, list):
            for validator in validates:
                self._verify_validator(validator, path)
        else:
            self._verify_validator(validates, path)
177815
def assert_valid(self, instance, value=None):
        """"""
        valid = super(Instance, self).assert_valid(instance, value)
        if not valid:
            return False
        if value is None:
            value = instance._get(self.name)
        if isinstance(value, HasProperties):
            value.validate()
        return True
775419
public static function verify()
    {
        $mocks = self::$outstanding_shmocks;
        self::$outstanding_shmocks = [];
        foreach ($mocks as $mock) {
            $mock->verify();
        }
    }