Lines Matching refs:set
50 # Without this, the __class__ properties wouldn't be set correctly
263 # Mock is not configured yet so the attributes are set
501 If `spec_set` is True then only attributes on the spec can be set."""
629 Attributes plus return values and side effects can be set on child
637 # attributes are set before we set attributes on
759 return sorted(set(extras + from_type + from_dict + from_child_mocks))
771 msg = 'Attempting to set unsupported magic method %r.' % name
782 # only set _new_name and not name so that mock_calls is tracked
796 raise AttributeError(f'Cannot set {mock_name}')
806 # not set on the instance itself
1135 # needs to be set here so assertions on call arguments pass before
1219 * `spec_set`: A stricter variant of `spec`. If used, attempting to *set*
1249 If the mock has an explicit `return_value` set then calls are not passed
1257 used to set attributes on the mock after it is created.
1448 # set spec to the object we are replacing
1542 # can't set keyword args when we aren't creating the mock
1728 A more powerful form of `spec` is `autospec`. If you set `autospec=True`
1749 code when your test methods share a common patchings set. `patch` finds
1789 `values` can be a dictionary of values to set in the dictionary. `values`
1793 values are set.
1795 `patch.dict` can also be called with arbitrary keyword arguments to set
2117 remove_magics = set()
2126 these_magics = these_magics - set(type(self).__dict__)
2141 If `spec_set` is True then only attributes on the spec can be set."""
2168 If `spec_set` is True then only attributes on the spec can be set."""
2203 # It is set through __dict__ because when spec_set is True, this
2661 If `spec_set` is True then attempting to set attributes that don't exist
2717 # for a top level object no _new_name should be set
2896 file_spec = list(set(dir(_io.TextIOWrapper)).union(set(dir(_io.BytesIO))))
2901 open_spec = list(set(dir(_io.open)))
2940 no args. Setting it calls the mock with the value being set.