(func, funcopy)
| 138 | |
| 139 | |
| 140 | def _copy_func_details(func, funcopy): |
| 141 | # we explicitly don't copy func.__dict__ into this copy as it would |
| 142 | # expose original attributes that should be mocked |
| 143 | for attribute in ( |
| 144 | '__name__', '__doc__', '__text_signature__', |
| 145 | '__module__', '__defaults__', '__kwdefaults__', |
| 146 | ): |
| 147 | try: |
| 148 | setattr(funcopy, attribute, getattr(func, attribute)) |
| 149 | except AttributeError: |
| 150 | pass |
| 151 | |
| 152 | |
| 153 | def _callable(obj): |
no test coverage detected