Raises ValueError if `found` is not equal to or found within `expected`.
(expected, found)
| 226 | |
| 227 | |
| 228 | def check_version(expected, found): |
| 229 | """Raises ValueError if `found` is not equal to or found within |
| 230 | `expected`. |
| 231 | |
| 232 | """ |
| 233 | if is_sequence(expected): |
| 234 | is_good = found in expected |
| 235 | else: |
| 236 | is_good = (found == expected) |
| 237 | |
| 238 | if not is_good: |
| 239 | error = "Version '{0}' is invalid. Expected {1}." |
| 240 | error = error.format(found, expected) |
| 241 | raise ValueError(error) |
| 242 | |
| 243 | |
| 244 | def iter_vars(obj): |
nothing calls this directly
no test coverage detected