Return a mapping of setup() method call keyword arguments.
(node: ast.Call, body)
| 161 | |
| 162 | |
| 163 | def get_call_kwargs(node: ast.Call, body): |
| 164 | """ |
| 165 | Return a mapping of setup() method call keyword arguments. |
| 166 | """ |
| 167 | result = {} |
| 168 | keywords = getattr(node, 'keywords', []) or [] |
| 169 | for keyword in keywords: |
| 170 | # dict unpacking |
| 171 | if keyword.arg is None: |
| 172 | value = node_to_value(keyword.value, body) |
| 173 | if isinstance(value, dict): |
| 174 | result.update(value) |
| 175 | continue |
| 176 | # keyword argument |
| 177 | value = node_to_value(keyword.value, body) |
| 178 | if value is None: |
| 179 | continue |
| 180 | result[keyword.arg] = value |
| 181 | return result |
| 182 | |
| 183 | |
| 184 | def clean_setup(data): |
no test coverage detected