Commit 4939fd6
committed
Fix: Resolve multiple errors in parallel_report_download test and script
This commit addresses several issues:
1. Corrected `ImportError` for `Metrics` in
`examples/reporting/tests/test_parallel_report_download.py` by
changing the import path from `...resources.types.metrics` to
`...common.types.metrics`.
2. Corrected `ImportError` for `GoogleAdsRow` in the same test file
by changing the import path from `...resources.types.google_ads_row`
to `...services.types.google_ads_service`.
3. Fixed a `TypeError` in `test_issue_search_request_error_and_retry_success`
by adding the missing `request_id` argument when instantiating
`GoogleAdsException`.
4. Resolved a `PicklingError` for `issue_search_request` that occurred
when `test_if_name_main_block` runs `parallel_report_download.py`
via `runpy`. The script `parallel_report_download.py` was modified
in its `if __name__ == "__main__":` block to import itself and call
its `main` function via this module import. This ensures that
functions passed to `multiprocessing.Pool` are pickled with their
module name, not as part of `__main__`.1 parent d7d25c8 commit 4939fd6
File tree
2 files changed
+4
-2
lines changed- examples/reporting
- tests
2 files changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | | - | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
| 148 | + | |
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| |||
0 commit comments