{"action":"opened","issue":{"url":"https://api.github.com/repos/exercism/xpython/issues/312","repository_url":"https://api.github.com/repos/exercism/xpython","labels_url":"https://api.github.com/repos/exercism/xpython/issues/312/labels{/name}","comments_url":"https://api.github.com/repos/exercism/xpython/issues/312/comments","events_url":"https://api.github.com/repos/exercism/xpython/issues/312/events","html_url":"https://github.com/exercism/xpython/issues/312","id":135171627,"number":312,"title":"bob_test doesn't fully test bob specification","user":{"login":"matts-code","id":17278422,"avatar_url":"https://avatars.githubusercontent.com/u/17278422?v=3","gravatar_id":"","url":"https://api.github.com/users/matts-code","html_url":"https://github.com/matts-code","followers_url":"https://api.github.com/users/matts-code/followers","following_url":"https://api.github.com/users/matts-code/following{/other_user}","gists_url":"https://api.github.com/users/matts-code/gists{/gist_id}","starred_url":"https://api.github.com/users/matts-code/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matts-code/subscriptions","organizations_url":"https://api.github.com/users/matts-code/orgs","repos_url":"https://api.github.com/users/matts-code/repos","events_url":"https://api.github.com/users/matts-code/events{/privacy}","received_events_url":"https://api.github.com/users/matts-code/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-21T07:07:26Z","updated_at":"2016-02-21T07:07:26Z","closed_at":null,"body":"The bob test suite doesn't test the case of ending a non-question statement with whitespace.  You can see that by this code passing all given tests, but failing if a test case of a statement with trailing whitespace is given.\r\n\r\n```\r\nfrom string import letters\r\n\r\ndef hey(what):\r\n\r\n    if not what or what.isspace():\r\n    \treturn \"Fine. Be that way!\"\r\n\r\n    elif what == what.upper() and not set(letters).isdisjoint(set(what)):\r\n    \treturn \"Whoa, chill out!\"\r\n\r\n    elif what.endswith((\"?\",\" \")):\r\n    \treturn \"Sure.\"\r\n\r\n    return \"Whatever.\"\r\n```\r\n\r\nAn example test case is \r\n\r\n```\r\ndef test_non_question_ends_with_whitespace(self):\r\n        self.assertEqual(\r\n            'Whatever.', bob.hey('This is a statement with trailing whitespace   ')\r\n        )\r\n```\r\n\r\n"}}