Title: gh-48330: assert warning is emitted on unittest.TestResult with no addDuration by iritkatriel · Pull Request #103309 · python/cpython · GitHub
Open Graph Title: gh-48330: assert warning is emitted on unittest.TestResult with no addDuration by iritkatriel · Pull Request #103309 · python/cpython
X Title: gh-48330: assert warning is emitted on unittest.TestResult with no addDuration by iritkatriel · Pull Request #103309 · python/cpython
Description: Fixes the warning below, which started with #12271. ====================================================================== ERROR: test_run_call_order_default_result (test.test_unittest.test_case.Test_TestCase.test_run_call_order_default_result) ---------------------------------------------------------------------- AttributeError: 'ResultWithNoStartTestRunStopTestRun' object has no attribute 'addDuration' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/iritkatriel/src/cpython/Lib/test/test_unittest/test_case.py", line 307, in test_run_call_order_default_result Foo('test').run() File "/Users/iritkatriel/src/cpython/Lib/unittest/case.py", line 639, in run self._addDuration(result, (time.perf_counter() - start_time)) File "/Users/iritkatriel/src/cpython/Lib/unittest/case.py", line 580, in _addDuration warnings.warn("TestResult has no addDuration method", RuntimeWarning: TestResult has no addDuration method Issue: gh-48330
Open Graph Description: Fixes the warning below, which started with #12271. ====================================================================== ERROR: test_run_call_order_default_result (test.test_unittest.test_case.Te...
X Description: Fixes the warning below, which started with #12271. ====================================================================== ERROR: test_run_call_order_default_result (test.test_unittest.test_case.Te...
Opengraph URL: https://github.com/python/cpython/pull/103309
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:f1cca5c9-0ce1-be49-b4f2-a5955104cf67 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | CAE4:AA16D:BFDDDD:10BE4A1:696A2BB9 |
| html-safe-nonce | 11b47770c7b23978e416ae6cf68be77dd8fce963e2dd8717e9aac6f52823f4f5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQUU0OkFBMTZEOkJGRERERDoxMEJFNEExOjY5NkEyQkI5IiwidmlzaXRvcl9pZCI6IjU0NDEwMTI3MjE2ODA0OTU5MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f7a30a57f836a9052d05187bc13b3a17266f644659b7478dd128e2d3b2fd9af6 |
| hovercard-subject-tag | pull_request:1304506600 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/103309/files |
| twitter:image | https://avatars.githubusercontent.com/u/1055913?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1055913?s=400&v=4 |
| og:image:alt | Fixes the warning below, which started with #12271. ====================================================================== ERROR: test_run_call_order_default_result (test.test_unittest.test_case.Te... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | ade130928b3890d20ecf9c887468a17e88d5c9a740ea2a85c2c2162e7c58e623 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c00842167ca2e5b13e8171812965d503e925ece6 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width