Title: bpython.test.test_interpreter.TestInterpreter.test_syntaxerror fails (bpython 0.22.1) · Issue #952 · bpython/bpython · GitHub
Open Graph Title: bpython.test.test_interpreter.TestInterpreter.test_syntaxerror fails (bpython 0.22.1) · Issue #952 · bpython/bpython
X Title: bpython.test.test_interpreter.TestInterpreter.test_syntaxerror fails (bpython 0.22.1) · Issue #952 · bpython/bpython
Description: When packaging 0.22.1 for openSUSE I get this failure in the test suite run: [ 28s] ====================================================================== [ 28s] FAIL: test_syntaxerror (bpython.test.test_interpreter.TestInterpreter) [ 28...
Open Graph Description: When packaging 0.22.1 for openSUSE I get this failure in the test suite run: [ 28s] ====================================================================== [ 28s] FAIL: test_syntaxerror (bpython.tes...
X Description: When packaging 0.22.1 for openSUSE I get this failure in the test suite run: [ 28s] ====================================================================== [ 28s] FAIL: test_syntaxerror (bpython.tes...
Opengraph URL: https://github.com/bpython/bpython/issues/952
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"bpython.test.test_interpreter.TestInterpreter.test_syntaxerror fails (bpython 0.22.1)","articleBody":"When packaging 0.22.1 for openSUSE I get this failure in the test suite run:\r\n```\r\n[ 28s] ======================================================================\r\n[ 28s] FAIL: test_syntaxerror (bpython.test.test_interpreter.TestInterpreter)\r\n[ 28s] ----------------------------------------------------------------------\r\n[ 28s] Traceback (most recent call last):\r\n[ 28s] File \"/home/abuild/rpmbuild/BUILD/bpython-0.22.1/bpython/test/test_interpreter.py\", line 87, in test_syntaxerror\r\n[ 28s] self.assertMultiLineEqual(str(plain(\"\").join(a)), str(expected))\r\n[ 28s] AssertionError: ' Fi[92 chars]n ^^\\n\\x1b[31m\\x1b[1mSyntaxError\\x1b[0m\\[37 chars]9m\\n' != ' Fi[92 chars]n ^^^^^\\n\\x1b[31m\\x1b[1mSyntaxError\\x1b[0m\\[66 chars]9m\\n'\r\n[ 28s] File \"\u003cbpython-input-148\u003e\", line 1\r\n[ 28s] 1.1.1.1\r\n[ 28s] - ^^\r\n[ 28s] + ^^^^^\r\n[ 28s] - SyntaxError: invalid syntax\r\n[ 28s] + SyntaxError: invalid syntax. Perhaps you forgot a comma?\r\n[ 28s] ? +++++++++++++++++++++++++++++\r\n[ 28s] \r\n[ 28s] \r\n[ 28s] ----------------------------------------------------------------------\r\n[ 28s] Ran 321 tests in 2.776s\r\n[ 28s] \r\n[ 28s] FAILED (failures=1, skipped=20, expected failures=3)\r\n[ 28s] tmp6b65mybw\r\n[ 28s] tmpmoudgnm3\r\n[ 28s] \r\n[ 28s] import inspect\r\n[ 28s] \r\n[ 28s] class TestCls:\r\n[ 28s] # A class with boring __init__ typing\r\n[ 28s] def __init__(self, *args, **kwargs):\r\n[ 28s] pass\r\n[ 28s] # But that uses super exotic typings recognized by inspect.signature\r\n[ 28s] __signature__ = inspect.Signature([\r\n[ 28s] inspect.Parameter(\"apple\", inspect.Parameter.POSITIONAL_ONLY),\r\n[ 28s] inspect.Parameter(\"apple2\", inspect.Parameter.KEYWORD_ONLY),\r\n[ 28s] inspect.Parameter(\"pinetree\", inspect.Parameter.KEYWORD_ONLY),\r\n[ 28s] ])\r\n```\r\n\r\nIt seems to me that this patch fixes the problem:\r\n```diff\r\n---\r\n bpython/test/test_interpreter.py | 4 ++--\r\n 1 file changed, 2 insertions(+), 2 deletions(-)\r\n\r\n--- a/bpython/test/test_interpreter.py\r\n+++ b/bpython/test/test_interpreter.py\r\n@@ -41,10 +41,10 @@ class TestInterpreter(unittest.TestCase)\r\n + green('\"\u003cbpython-input-148\u003e\"')\r\n + \", line \"\r\n + bold(magenta(\"1\"))\r\n- + \"\\n 1.1.1.1\\n ^^^^^\\n\"\r\n+ + \"\\n 1.1.1.1\\n ^^\\n\"\r\n + bold(red(\"SyntaxError\"))\r\n + \": \"\r\n- + cyan(\"invalid syntax. Perhaps you forgot a comma?\")\r\n+ + cyan(\"invalid syntax\")\r\n + \"\\n\"\r\n )\r\n elif (3, 8) \u003c= sys.version_info[:2] \u003c= (3, 9):\r\n```","author":{"url":"https://github.com/mcepl","@type":"Person","name":"mcepl"},"datePublished":"2022-02-02T19:59:13.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/952/bpython/issues/952"}
| 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:bd940d6e-cd4d-d3f7-8f13-3ea310455def |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A880:125F02:127764:18B88D:69670433 |
| html-safe-nonce | 49790ef53fbb04cf6df8a1d0fe933278487f4fbb6b003c962b5d671e6e9dc4e9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBODgwOjEyNUYwMjoxMjc3NjQ6MThCODhEOjY5NjcwNDMzIiwidmlzaXRvcl9pZCI6IjY5MDE4MjA5MzM4NDg2MzAzMjMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 44a16b897426f6080a193eff63867aa8553a7ef630b0141b453dfb0a8df25a54 |
| hovercard-subject-tag | issue:1122330854 |
| 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/bpython/bpython/952/issue_layout |
| twitter:image | https://opengraph.githubassets.com/bab3fe6b930de1c147f533899b62dad4f61831f300319cb11795117ef815e7c1/bpython/bpython/issues/952 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/bab3fe6b930de1c147f533899b62dad4f61831f300319cb11795117ef815e7c1/bpython/bpython/issues/952 |
| og:image:alt | When packaging 0.22.1 for openSUSE I get this failure in the test suite run: [ 28s] ====================================================================== [ 28s] FAIL: test_syntaxerror (bpython.tes... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mcepl |
| hostname | github.com |
| expected-hostname | github.com |
| None | 10b629569a71f325bbe100683b0ccc26c67ec87331658842c73b5ea71f03ac7b |
| turbo-cache-control | no-preview |
| go-import | github.com/bpython/bpython git https://github.com/bpython/bpython.git |
| octolytics-dimension-user_id | 8071396 |
| octolytics-dimension-user_login | bpython |
| octolytics-dimension-repository_id | 21508865 |
| octolytics-dimension-repository_nwo | bpython/bpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 21508865 |
| octolytics-dimension-repository_network_root_nwo | bpython/bpython |
| 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 | 1e8b7c19c9a48ebea057f7443387e8fbbc97710a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width