Title: 1.9.0: test_runtime_typing_objects fails · Issue #17005 · python/mypy · GitHub
Open Graph Title: 1.9.0: test_runtime_typing_objects fails · Issue #17005 · python/mypy
X Title: 1.9.0: test_runtime_typing_objects fails · Issue #17005 · python/mypy
Description: Bug Report I'm running tests for 1.9.0 and I found that the StubtestUnit.test_runtime_typing_objects test fails. To Reproduce Run tests. Expected Behavior All tests pass. Actual Behavior ___________________ StubtestUnit.test_runtime_typi...
Open Graph Description: Bug Report I'm running tests for 1.9.0 and I found that the StubtestUnit.test_runtime_typing_objects test fails. To Reproduce Run tests. Expected Behavior All tests pass. Actual Behavior __________...
X Description: Bug Report I'm running tests for 1.9.0 and I found that the StubtestUnit.test_runtime_typing_objects test fails. To Reproduce Run tests. Expected Behavior All tests pass. Actual Behavior ______...
Opengraph URL: https://github.com/python/mypy/issues/17005
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"1.9.0: test_runtime_typing_objects fails","articleBody":"**Bug Report**\r\n\r\nI'm running tests for 1.9.0 and I found that the `StubtestUnit.test_runtime_typing_objects` test fails.\r\n\r\n**To Reproduce**\r\n\r\nRun tests.\r\n\r\n**Expected Behavior**\r\n\r\nAll tests pass.\r\n\r\n**Actual Behavior**\r\n\r\n```\r\n___________________ StubtestUnit.test_runtime_typing_objects ___________________\r\n[gw1] sunos5 -- Python 3.9.18 $(BUILD_DIR)/.tox/py39/bin/python\r\n\r\nargs = (\u003cmypy.test.teststubtest.StubtestUnit testMethod=test_runtime_typing_objects>,)\r\nkwargs = {}\r\ncases = [\u003cmypy.test.teststubtest.Case object at 0x7fffacfaf550>, \u003cmypy.test.teststubtest.Case object at 0x7fffacfaff10>, \u003cmypy.test.teststubtest.Case object at 0x7fffacfaff40>]\r\nexpected_errors = set()\r\nc = \u003cmypy.test.teststubtest.Case object at 0x7fffacfaff40>, @py_assert1 = False\r\n@py_format3 = \"{'test_module.Y.__closed__', 'test_module.Y.__extra_items__'} == set()\\n~\\n~Extra items in the left set:\\n~'test_modu...__'\\n~\\n~Full diff:\\n~- set()\\n~+ {\\n~+ 'test_module.Y.__closed__',\\n~+ 'test_module.Y.__extra_items__',\\n~+ }\"\r\n@py_format5 = \"error: test_module.Y.__closed__ is not present in stub\\n~Stub: in file test_module.pyi\\n~MISSING\\n~Runtime:\\n~False\\n...__'\\n~\\n~Full diff:\\n~- set()\\n~+ {\\n~+ 'test_module.Y.__closed__',\\n~+ 'test_module.Y.__extra_items__',\\n~+ }\"\r\noutput = 'error: test_module.Y.__closed__ is not present in stub\\nStub: in file test_module.pyi\\nMISSING\\nRuntime:\\nFalse\\n\\ner... is not present in stub\\nStub: in file test_module.pyi\\nMISSING\\nRuntime:\\nNone\\n\\nFound 2 errors (checked 1 module)\\n'\r\nactual_errors = {'test_module.Y.__closed__', 'test_module.Y.__extra_items__'}\r\n\r\n def test(*args: Any, **kwargs: Any) -> None:\r\n cases = list(fn(*args, **kwargs))\r\n expected_errors = set()\r\n for c in cases:\r\n if c.error is None:\r\n continue\r\n expected_error = c.error\r\n if expected_error == \"\":\r\n expected_error = TEST_MODULE_NAME\r\n elif not expected_error.startswith(f\"{TEST_MODULE_NAME}.\"):\r\n expected_error = f\"{TEST_MODULE_NAME}.{expected_error}\"\r\n assert expected_error not in expected_errors, (\r\n \"collect_cases merges cases into a single stubtest invocation; we already \"\r\n \"expect an error for {}\".format(expected_error)\r\n )\r\n expected_errors.add(expected_error)\r\n output = run_stubtest(\r\n stub=\"\\n\\n\".join(textwrap.dedent(c.stub.lstrip(\"\\n\")) for c in cases),\r\n runtime=\"\\n\\n\".join(textwrap.dedent(c.runtime.lstrip(\"\\n\")) for c in cases),\r\n options=[\"--generate-allowlist\"],\r\n )\r\n\r\n actual_errors = set(output.splitlines())\r\n if actual_errors != expected_errors:\r\n output = run_stubtest(\r\n stub=\"\\n\\n\".join(textwrap.dedent(c.stub.lstrip(\"\\n\")) for c in cases),\r\n runtime=\"\\n\\n\".join(textwrap.dedent(c.runtime.lstrip(\"\\n\")) for c in cases),\r\n options=[],\r\n )\r\n> assert actual_errors == expected_errors, output\r\nE AssertionError: error: test_module.Y.__closed__ is not present in stub\r\nE Stub: in file test_module.pyi\r\nE MISSING\r\nE Runtime:\r\nE False\r\nE\r\nE error: test_module.Y.__extra_items__ is not present in stub\r\nE Stub: in file test_module.pyi\r\nE MISSING\r\nE Runtime:\r\nE None\r\nE\r\nE Found 2 errors (checked 1 module)\r\nE\r\nE assert {'test_module.Y.__closed__', 'test_module.Y.__extra_items__'} == set()\r\nE\r\nE Extra items in the left set:\r\nE 'test_module.Y.__closed__'\r\nE 'test_module.Y.__extra_items__'\r\nE\r\nE Full diff:\r\nE - set()\r\nE + {\r\nE + 'test_module.Y.__closed__',\r\nE + 'test_module.Y.__extra_items__',\r\nE + }\r\n\r\nmypy/test/teststubtest.py:219: AssertionError\r\n```\r\n\r\n**Your Environment**\r\n\r\n- Mypy version used: 1.9.0\r\n- Mypy command-line flags: N/A\r\n- Mypy configuration options from `mypy.ini` (and other config files): N/A\r\n- Python version used: 3.9.18","author":{"url":"https://github.com/mtelka","@type":"Person","name":"mtelka"},"datePublished":"2024-03-09T13:29:20Z","url":"https://github.com/python/mypy/issues/17005"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f4205103-92b6-eba8-50c1-b5c9218aca98 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9A36:23FDF9:1EB9C83:29CE937:6B001B22 |
| html-safe-nonce | 8855359a9e047ba3038ab3bae293638a9f5b630a3747f2f79a3ad38470b2d772 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QTM2OjIzRkRGOToxRUI5QzgzOjI5Q0U5Mzc6NkIwMDFCMjIiLCJ2aXNpdG9yX2lkIjoiMjE3MzUzMTYzMDAxMjk5NjM4NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 62d9f2ae77ba6151329303c8e5ba3c8ba02b343da8380ea7b0470f2b27c55ff8 |
| hovercard-subject-tag | issue:2177226624 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/python/mypy/17005/issue_layout |
| twitter:image | https://opengraph.githubassets.com/296ffbeba7eeec7138881d632d977febe230db408d30df8de2de54b4e372ce2c/python/mypy/issues/17005 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/296ffbeba7eeec7138881d632d977febe230db408d30df8de2de54b4e372ce2c/python/mypy/issues/17005 |
| og:image:alt | Bug Report I'm running tests for 1.9.0 and I found that the StubtestUnit.test_runtime_typing_objects test fails. To Reproduce Run tests. Expected Behavior All tests pass. Actual Behavior __________... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mtelka |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4eb4cba0d69f045374ac15de9666d22b0961e1d555cc3824f36b7734c00c78e0 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/mypy git https://github.com/python/mypy.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 7053637 |
| octolytics-dimension-repository_nwo | python/mypy |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 7053637 |
| octolytics-dimension-repository_network_root_nwo | python/mypy |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 44c658b24abf00491fb7ae5f56d42c9f38cbeab2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width