Title: case error in test_unary.py · Issue #99688 · python/cpython · GitHub
Open Graph Title: case error in test_unary.py · Issue #99688 · python/cpython
X Title: case error in test_unary.py · Issue #99688 · python/cpython
Description: Hello all, I was looking throw the test code in cpython to use a test cases for my own python interpreter. While looking at the code, I got curious. First is this function. cpython/Lib/test/test_unary.py Lines 23 to 27 in 7e3f09c def tes...
Open Graph Description: Hello all, I was looking throw the test code in cpython to use a test cases for my own python interpreter. While looking at the code, I got curious. First is this function. cpython/Lib/test/test_un...
X Description: Hello all, I was looking throw the test code in cpython to use a test cases for my own python interpreter. While looking at the code, I got curious. First is this function. cpython/Lib/test/test_un...
Opengraph URL: https://github.com/python/cpython/issues/99688
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"case error in test_unary.py","articleBody":"Hello all,\r\nI was looking throw the test code in cpython to use a test cases for my own python interpreter.\r\nWhile looking at the code, I got curious.\r\n\r\nFirst is this function.\r\n\r\n\u003e https://github.com/python/cpython/blob/7e3f09cad9b783d8968aa79ff6a8ee57beb8b83e/Lib/test/test_unary.py#L23-L27\r\n\r\nI think this function is not testing invert operator.\r\nInstead it is just copying test cases of negative operator.\r\n\r\nNext is these functions.\r\n\u003e https://github.com/python/cpython/blob/7e3f09cad9b783d8968aa79ff6a8ee57beb8b83e/Lib/test/test_unary.py#L7-L13\r\n\u003e https://github.com/python/cpython/blob/7e3f09cad9b783d8968aa79ff6a8ee57beb8b83e/Lib/test/test_unary.py#L15-L21\r\n\r\nI think these functions have duplicated test cases.\r\n`self.assertTrue(-2 == 0 - 2)` tested twice in test_negative,\r\n`self.assertEqual(+2, 2)` tested twice as well in test_positive.\r\n\r\nI want to know if there is an intention that I don't know. \r\nOr if there is a problem, I think we need to fix the test code.\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-99712\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/Isaac-Lee","@type":"Person","name":"Isaac-Lee"},"datePublished":"2022-11-22T13:47:56.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/99688/cpython/issues/99688"}
| 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:35858b7c-39f0-3655-06b2-f525bc8bcfcb |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9690:57C20:7BB7E1:A4C089:696978B6 |
| html-safe-nonce | b1d3ffe23872cf4dc9ba61ea0a29c944754b4ac839375a6578f0bba361a373ab |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NjkwOjU3QzIwOjdCQjdFMTpBNEMwODk6Njk2OTc4QjYiLCJ2aXNpdG9yX2lkIjoiNDY3NzA5MjQ0Mzc5NTkyODg2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | c710ccfbc9be330aa42a87d9877f7009c0dfbe02457516abfae5166164e315c4 |
| hovercard-subject-tag | issue:1459907232 |
| 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/cpython/99688/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5866d28c3d21b5293396bec49ad02b0614cede0094780f0ee2cdab69a9626cd9/python/cpython/issues/99688 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5866d28c3d21b5293396bec49ad02b0614cede0094780f0ee2cdab69a9626cd9/python/cpython/issues/99688 |
| og:image:alt | Hello all, I was looking throw the test code in cpython to use a test cases for my own python interpreter. While looking at the code, I got curious. First is this function. cpython/Lib/test/test_un... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Isaac-Lee |
| hostname | github.com |
| expected-hostname | github.com |
| None | c6f193beb8ff08443adc07685d75302ab8aaf0a135f6e251c3ff3112c8deb881 |
| turbo-cache-control | no-preview |
| 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 | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 212e3e3d3298bf5b313830edfd2399e869f7ea76 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width