{"action":"created","issue":{"url":"https://api.github.com/repos/note35/sinon/issues/45","repository_url":"https://api.github.com/repos/note35/sinon","labels_url":"https://api.github.com/repos/note35/sinon/issues/45/labels{/name}","comments_url":"https://api.github.com/repos/note35/sinon/issues/45/comments","events_url":"https://api.github.com/repos/note35/sinon/issues/45/events","html_url":"https://github.com/note35/sinon/pull/45","id":293650002,"number":45,"title":"Removed pure_count and added property methods to _SinonStubCondition","user":{"login":"jonathan-benn","id":26097025,"avatar_url":"https://avatars1.githubusercontent.com/u/26097025?v=4","gravatar_id":"","url":"https://api.github.com/users/jonathan-benn","html_url":"https://github.com/jonathan-benn","followers_url":"https://api.github.com/users/jonathan-benn/followers","following_url":"https://api.github.com/users/jonathan-benn/following{/other_user}","gists_url":"https://api.github.com/users/jonathan-benn/gists{/gist_id}","starred_url":"https://api.github.com/users/jonathan-benn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonathan-benn/subscriptions","organizations_url":"https://api.github.com/users/jonathan-benn/orgs","repos_url":"https://api.github.com/users/jonathan-benn/repos","events_url":"https://api.github.com/users/jonathan-benn/events{/privacy}","received_events_url":"https://api.github.com/users/jonathan-benn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-02-01T19:14:16Z","updated_at":"2018-02-02T10:24:40Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/note35/sinon/pulls/45","html_url":"https://github.com/note35/sinon/pull/45","diff_url":"https://github.com/note35/sinon/pull/45.diff","patch_url":"https://github.com/note35/sinon/pull/45.patch"},"body":"Fixes note35/sinon#40"},"comment":{"url":"https://api.github.com/repos/note35/sinon/issues/comments/362547494","html_url":"https://github.com/note35/sinon/pull/45#issuecomment-362547494","issue_url":"https://api.github.com/repos/note35/sinon/issues/45","id":362547494,"user":{"login":"note35","id":5159944,"avatar_url":"https://avatars2.githubusercontent.com/u/5159944?v=4","gravatar_id":"","url":"https://api.github.com/users/note35","html_url":"https://github.com/note35","followers_url":"https://api.github.com/users/note35/followers","following_url":"https://api.github.com/users/note35/following{/other_user}","gists_url":"https://api.github.com/users/note35/gists{/gist_id}","starred_url":"https://api.github.com/users/note35/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/note35/subscriptions","organizations_url":"https://api.github.com/users/note35/orgs","repos_url":"https://api.github.com/users/note35/repos","events_url":"https://api.github.com/users/note35/events{/privacy}","received_events_url":"https://api.github.com/users/note35/received_events","type":"User","site_admin":false},"created_at":"2018-02-02T10:24:40Z","updated_at":"2018-02-02T10:24:40Z","author_association":"OWNER","body":"For reducing the test code size, I believe call function **one** time is enough.\r\n\r\nBesides, I recommend to check:\r\n\r\n- declare 2 pure spy/stub, call them separately, and test their call count.\r\n\r\n```python\r\n@sinontest\r\ndef test550_callCount_pure_chained(self):\r\n    stub = SinonStub(os, \"system\").onSecondCall().returns(42)\r\n    self.assertEqual(pure_stub2.callCount, 0)\r\n    os.system(\"cd\")\r\n    self.assertEqual(pure_stub2.callCount, 1)\r\n```\r\n\r\n- test call count before call.\r\n\r\n```python\r\n@sinontest\r\ndef test550_callCount_pure_chained(self):\r\n    pure_stub1 = SinonStub().onSecondCall().returns(42)\r\n    pure_stub2 = SinonStub().onSecondCall().returns(42)\r\n    pure_stub1()\r\n    pure_stub2()\r\n    pure_stub2()\r\n    self.assertEqual(pure_stub1.callCount, 1)\r\n    self.assertEqual(pure_stub2.callCount, 2)\r\n```"}}
{"actor":{"display_login":"note35"}}