{"action":"created","issue":{"url":"https://api.github.com/repos/dkotegov/home-assignment-3/issues/6","labels_url":"https://api.github.com/repos/dkotegov/home-assignment-3/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/dkotegov/home-assignment-3/issues/6/comments","events_url":"https://api.github.com/repos/dkotegov/home-assignment-3/issues/6/events","html_url":"https://github.com/dkotegov/home-assignment-3/pull/6","id":116521141,"number":6,"title":"Хасанов Булат","user":{"login":"KhasanovBI","id":8990821,"avatar_url":"https://avatars.githubusercontent.com/u/8990821?v=3","gravatar_id":"","url":"https://api.github.com/users/KhasanovBI","html_url":"https://github.com/KhasanovBI","followers_url":"https://api.github.com/users/KhasanovBI/followers","following_url":"https://api.github.com/users/KhasanovBI/following{/other_user}","gists_url":"https://api.github.com/users/KhasanovBI/gists{/gist_id}","starred_url":"https://api.github.com/users/KhasanovBI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KhasanovBI/subscriptions","organizations_url":"https://api.github.com/users/KhasanovBI/orgs","repos_url":"https://api.github.com/users/KhasanovBI/repos","events_url":"https://api.github.com/users/KhasanovBI/events{/privacy}","received_events_url":"https://api.github.com/users/KhasanovBI/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-12T10:27:57Z","updated_at":"2015-11-12T21:07:50Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dkotegov/home-assignment-3/pulls/6","html_url":"https://github.com/dkotegov/home-assignment-3/pull/6","diff_url":"https://github.com/dkotegov/home-assignment-3/pull/6.diff","patch_url":"https://github.com/dkotegov/home-assignment-3/pull/6.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/dkotegov/home-assignment-3/issues/comments/156234025","html_url":"https://github.com/dkotegov/home-assignment-3/pull/6#issuecomment-156234025","issue_url":"https://api.github.com/repos/dkotegov/home-assignment-3/issues/6","id":156234025,"user":{"login":"dkotegov","id":11413412,"avatar_url":"https://avatars.githubusercontent.com/u/11413412?v=3","gravatar_id":"","url":"https://api.github.com/users/dkotegov","html_url":"https://github.com/dkotegov","followers_url":"https://api.github.com/users/dkotegov/followers","following_url":"https://api.github.com/users/dkotegov/following{/other_user}","gists_url":"https://api.github.com/users/dkotegov/gists{/gist_id}","starred_url":"https://api.github.com/users/dkotegov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkotegov/subscriptions","organizations_url":"https://api.github.com/users/dkotegov/orgs","repos_url":"https://api.github.com/users/dkotegov/repos","events_url":"https://api.github.com/users/dkotegov/events{/privacy}","received_events_url":"https://api.github.com/users/dkotegov/received_events","type":"User","site_admin":false},"created_at":"2015-11-12T21:07:50Z","updated_at":"2015-11-12T21:07:50Z","body":"Мне понравились Ваши тесты, но калькулятор не очень точный:\r\n```python\r\n    def test_add(self):\r\n        self.assertEqual(self.calculator.add(0.1, 0.2), 0.3)\r\n    \r\n    def test_sub(self):\r\n        self.assertEqual(self.calculator.subtract(0.3, 0.1), 0.2)\r\n\r\n    def test_mul(self):\r\n        self.assertEqual(self.calculator.multiply(12, 0.1), 1.2)\r\n    \r\n    def test_div(self):\r\n        self.assertEqual(self.calculator.divide(0.3, 0.1), 3)\r\n    \r\n    def test_sin(self):\r\n        self.assertEqual(self.calculator.sin(math.pi/6), 0.5)\r\n```\r\n```python\r\n======================================================================\r\nFAIL: test_add (tests.test_calculator.CalculatorTestCase)\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"/Users/Dmitry/TPHomeWork/stud/home-assignment-3/tests/test_calculator.py\", line 102, in test_add\r\n    self.assertEqual(self.calculator.add(0.1, 0.2), 0.3)\r\nAssertionError: 0.30000000000000004 != 0.3\r\n\r\n======================================================================\r\nFAIL: test_div (tests.test_calculator.CalculatorTestCase)\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"/Users/Dmitry/TPHomeWork/stud/home-assignment-3/tests/test_calculator.py\", line 111, in test_div\r\n    self.assertEqual(self.calculator.divide(0.3, 0.1), 3)\r\nAssertionError: 2.9999999999999996 != 3\r\n\r\n======================================================================\r\nFAIL: test_mul (tests.test_calculator.CalculatorTestCase)\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"/Users/Dmitry/TPHomeWork/stud/home-assignment-3/tests/test_calculator.py\", line 108, in test_mul\r\n    self.assertEqual(self.calculator.multiply(12, 0.1), 1.2)\r\nAssertionError: 1.2000000000000002 != 1.2\r\n\r\n======================================================================\r\nFAIL: test_sin (tests.test_calculator.CalculatorTestCase)\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"/Users/Dmitry/TPHomeWork/stud/home-assignment-3/tests/test_calculator.py\", line 114, in test_sin\r\n    self.assertEqual(self.calculator.sin(math.pi/6), 0.5)\r\nAssertionError: 0.49999999999999994 != 0.5\r\n\r\n======================================================================\r\nFAIL: test_sub (tests.test_calculator.CalculatorTestCase)\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"/Users/Dmitry/TPHomeWork/stud/home-assignment-3/tests/test_calculator.py\", line 105, in test_sub\r\n    self.assertEqual(self.calculator.subtract(0.3, 0.1), 0.2)\r\nAssertionError: 0.19999999999999998 != 0.2\r\n```\r\nПопробуйте Decimal"}}