{"action":"created","issue":{"url":"https://api.github.com/repos/jupyter/jupyter_kernel_test/issues/44","repository_url":"https://api.github.com/repos/jupyter/jupyter_kernel_test","labels_url":"https://api.github.com/repos/jupyter/jupyter_kernel_test/issues/44/labels{/name}","comments_url":"https://api.github.com/repos/jupyter/jupyter_kernel_test/issues/44/comments","events_url":"https://api.github.com/repos/jupyter/jupyter_kernel_test/issues/44/events","html_url":"https://github.com/jupyter/jupyter_kernel_test/issues/44","id":375889372,"node_id":"MDU6SXNzdWUzNzU4ODkzNzI=","number":44,"title":"Version 0.3: code_page_something not optional?","user":{"login":"martinRenou","id":21197331,"node_id":"MDQ6VXNlcjIxMTk3MzMx","avatar_url":"https://avatars0.githubusercontent.com/u/21197331?v=4","gravatar_id":"","url":"https://api.github.com/users/martinRenou","html_url":"https://github.com/martinRenou","followers_url":"https://api.github.com/users/martinRenou/followers","following_url":"https://api.github.com/users/martinRenou/following{/other_user}","gists_url":"https://api.github.com/users/martinRenou/gists{/gist_id}","starred_url":"https://api.github.com/users/martinRenou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinRenou/subscriptions","organizations_url":"https://api.github.com/users/martinRenou/orgs","repos_url":"https://api.github.com/users/martinRenou/repos","events_url":"https://api.github.com/users/martinRenou/events{/privacy}","received_events_url":"https://api.github.com/users/martinRenou/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-31T10:16:27Z","updated_at":"2018-11-07T15:18:22Z","closed_at":null,"author_association":"NONE","body":"Using the last release of `jupyter_kernel_test` (0.3), I found that not testing `code_page_something` results in an error.\r\n\r\nThe following example works fine:\r\n```python\r\nimport unittest\r\nimport jupyter_kernel_test\r\n\r\n\r\nclass PythonTests(jupyter_kernel_test.KernelTests):\r\n\r\n    kernel_name = \"python3\"\r\n    language_name = \"python\"\r\n\r\n    code_page_something = \"?print\"\r\n\r\n    def test_python_stdout(self):\r\n        reply, output_msgs = self.execute_helper(code='print(3)')\r\n        self.assertEqual(output_msgs[0]['msg_type'], 'stream')\r\n        self.assertEqual(output_msgs[0]['content']['name'], 'stdout')\r\n        self.assertEqual(output_msgs[0]['content']['text'], '3\\n')\r\n\r\nif __name__ == '__main__':\r\n    unittest.main()\r\n```\r\n\r\nBut this one doesn't work:\r\n```python\r\nimport unittest\r\nimport jupyter_kernel_test\r\n\r\n\r\nclass PythonTests(jupyter_kernel_test.KernelTests):\r\n\r\n    kernel_name = \"python3\"\r\n    language_name = \"python\"\r\n\r\n    def test_python_stdout(self):\r\n        reply, output_msgs = self.execute_helper(code='print(3)')\r\n        self.assertEqual(output_msgs[0]['msg_type'], 'stream')\r\n        self.assertEqual(output_msgs[0]['content']['name'], 'stdout')\r\n        self.assertEqual(output_msgs[0]['content']['text'], '3\\n')\r\n\r\nif __name__ == '__main__':\r\n    unittest.main()\r\n```\r\n\r\nAnd results in this error:\r\n```\r\ntest_xeus_python_kernel.py:13: \r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n../../../../miniconda3/envs/dev/lib/python3.6/site-packages/jupyter_kernel_test/__init__.py:67: in execute_helper\r\n    validate_message(busy_msg, 'status', msg_id)\r\n../../../../miniconda3/envs/dev/lib/python3.6/site-packages/jupyter_kernel_test/messagespec.py:172: in validate_message\r\n    nt.assert_equal(msg['parent_header']['msg_id'], parent)\r\nE   AssertionError: 'd80cd30e-c108ad4a7797aaf0152d3e30' != 'cdcc4f0b-f60040a52145d517bdad7f23'\r\nE   - d80cd30e-c108ad4a7797aaf0152d3e30\r\nE   + cdcc4f0b-f60040a52145d517bdad7f23\r\n```\r\n\r\nAfter printing messages, I guess that the `kernel_info_reply` is not used in the second case, and instead of receiving the `execute_reply` it first receives the `kernel_info_reply`, resulting in this error.\r\n\r\nThis has been tested with three different kernel implementations (python3, xeus-cling, xeus-python)"},"comment":{"url":"https://api.github.com/repos/jupyter/jupyter_kernel_test/issues/comments/436658374","html_url":"https://github.com/jupyter/jupyter_kernel_test/issues/44#issuecomment-436658374","issue_url":"https://api.github.com/repos/jupyter/jupyter_kernel_test/issues/44","id":436658374,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNjY1ODM3NA==","user":{"login":"takluyver","id":327925,"node_id":"MDQ6VXNlcjMyNzkyNQ==","avatar_url":"https://avatars3.githubusercontent.com/u/327925?v=4","gravatar_id":"","url":"https://api.github.com/users/takluyver","html_url":"https://github.com/takluyver","followers_url":"https://api.github.com/users/takluyver/followers","following_url":"https://api.github.com/users/takluyver/following{/other_user}","gists_url":"https://api.github.com/users/takluyver/gists{/gist_id}","starred_url":"https://api.github.com/users/takluyver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/takluyver/subscriptions","organizations_url":"https://api.github.com/users/takluyver/orgs","repos_url":"https://api.github.com/users/takluyver/repos","events_url":"https://api.github.com/users/takluyver/events{/privacy}","received_events_url":"https://api.github.com/users/takluyver/received_events","type":"User","site_admin":false},"created_at":"2018-11-07T15:18:22Z","updated_at":"2018-11-07T15:18:22Z","author_association":"MEMBER","body":"Yup, it's definitely meant to be optional. Can you try on master? There have been some major changes since 0.3."}}
{"actor":{"display_login":"takluyver"}}