{"action":"closed","number":5576,"pull_request":{"url":"https://api.github.com/repos/pytest-dev/pytest/pulls/5576","id":295404613,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjk1NDA0NjEz","html_url":"https://github.com/pytest-dev/pytest/pull/5576","diff_url":"https://github.com/pytest-dev/pytest/pull/5576.diff","patch_url":"https://github.com/pytest-dev/pytest/pull/5576.patch","issue_url":"https://api.github.com/repos/pytest-dev/pytest/issues/5576","number":5576,"state":"closed","locked":false,"title":"doctest: Add +NUMBER option to ignore irrelevant floating-point differences","user":{"login":"drothlis","id":12424,"node_id":"MDQ6VXNlcjEyNDI0","avatar_url":"https://avatars0.githubusercontent.com/u/12424?v=4","gravatar_id":"","url":"https://api.github.com/users/drothlis","html_url":"https://github.com/drothlis","followers_url":"https://api.github.com/users/drothlis/followers","following_url":"https://api.github.com/users/drothlis/following{/other_user}","gists_url":"https://api.github.com/users/drothlis/gists{/gist_id}","starred_url":"https://api.github.com/users/drothlis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drothlis/subscriptions","organizations_url":"https://api.github.com/users/drothlis/orgs","repos_url":"https://api.github.com/users/drothlis/repos","events_url":"https://api.github.com/users/drothlis/events{/privacy}","received_events_url":"https://api.github.com/users/drothlis/received_events","type":"User","site_admin":false},"body":"When enabled, floating-point numbers only need to match as far as the\r\nprecision you have written in the expected doctest output. This avoids\r\nfalse positives caused by limited floating-point precision, like this:\r\n\r\n    Expected:\r\n        0.233\r\n    Got:\r\n        0.23300000000000001\r\n\r\nThis is inspired by Sébastien Boisgérault's [numtest] but the\r\nimplementation is a bit different:\r\n\r\n* This implementation edits the literals that are in the \"got\"\r\n  string (the actual output from the expression being tested), and then\r\n  proceeds to compare the strings literally. This is similar to pytest's\r\n  existing ALLOW_UNICODE and ALLOW_BYTES implementation.\r\n\r\n* This implementation only compares floats against floats, not ints\r\n  against floats. That is, the following doctest will fail with pytest\r\n  whereas it would pass with numtest:\r\n\r\n      >>> math.py  # doctest: +NUMBER\r\n      3\r\n\r\n  This behaviour should be less surprising (less false negatives) when\r\n  you enable NUMBER globally in pytest.ini.\r\n\r\nAdvantages of this implementation compared to numtest:\r\n\r\n* Doesn't require `import numtest` at the top level of the file.\r\n* Works with pytest (if you try to use pytest & numtest together, pytest\r\n  raises \"TypeError: unbound method check_output() must be called with\r\n  NumTestOutputChecker instance as first argument (got\r\n  LiteralsOutputChecker instance instead)\").\r\n* Works with Python 3.\r\n\r\n[numtest]: https://github.com/boisgera/numtest\r\n","created_at":"2019-07-08T16:10:50Z","updated_at":"2019-07-11T10:25:38Z","closed_at":"2019-07-11T10:25:38Z","merged_at":"2019-07-11T10:25:38Z","merge_commit_sha":"666acc9b7a708c4ec170f52fc1a3a2b687cadee0","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/pytest-dev/pytest/pulls/5576/commits","review_comments_url":"https://api.github.com/repos/pytest-dev/pytest/pulls/5576/comments","review_comment_url":"https://api.github.com/repos/pytest-dev/pytest/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pytest-dev/pytest/issues/5576/comments","statuses_url":"https://api.github.com/repos/pytest-dev/pytest/statuses/a740ef20367bad2d401ab6ac0092d26bd2b62379","head":{"label":"drothlis:doctest-number","ref":"doctest-number","sha":"a740ef20367bad2d401ab6ac0092d26bd2b62379","user":{"login":"drothlis","id":12424,"node_id":"MDQ6VXNlcjEyNDI0","avatar_url":"https://avatars0.githubusercontent.com/u/12424?v=4","gravatar_id":"","url":"https://api.github.com/users/drothlis","html_url":"https://github.com/drothlis","followers_url":"https://api.github.com/users/drothlis/followers","following_url":"https://api.github.com/users/drothlis/following{/other_user}","gists_url":"https://api.github.com/users/drothlis/gists{/gist_id}","starred_url":"https://api.github.com/users/drothlis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drothlis/subscriptions","organizations_url":"https://api.github.com/users/drothlis/orgs","repos_url":"https://api.github.com/users/drothlis/repos","events_url":"https://api.github.com/users/drothlis/events{/privacy}","received_events_url":"https://api.github.com/users/drothlis/received_events","type":"User","site_admin":false},"repo":{"id":188263989,"node_id":"MDEwOlJlcG9zaXRvcnkxODgyNjM5ODk=","name":"pytest","full_name":"drothlis/pytest","private":false,"owner":{"login":"drothlis","id":12424,"node_id":"MDQ6VXNlcjEyNDI0","avatar_url":"https://avatars0.githubusercontent.com/u/12424?v=4","gravatar_id":"","url":"https://api.github.com/users/drothlis","html_url":"https://github.com/drothlis","followers_url":"https://api.github.com/users/drothlis/followers","following_url":"https://api.github.com/users/drothlis/following{/other_user}","gists_url":"https://api.github.com/users/drothlis/gists{/gist_id}","starred_url":"https://api.github.com/users/drothlis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drothlis/subscriptions","organizations_url":"https://api.github.com/users/drothlis/orgs","repos_url":"https://api.github.com/users/drothlis/repos","events_url":"https://api.github.com/users/drothlis/events{/privacy}","received_events_url":"https://api.github.com/users/drothlis/received_events","type":"User","site_admin":false},"html_url":"https://github.com/drothlis/pytest","description":"The pytest framework makes it easy to write small tests, yet scales to support complex functional testing","fork":true,"url":"https://api.github.com/repos/drothlis/pytest","forks_url":"https://api.github.com/repos/drothlis/pytest/forks","keys_url":"https://api.github.com/repos/drothlis/pytest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/drothlis/pytest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/drothlis/pytest/teams","hooks_url":"https://api.github.com/repos/drothlis/pytest/hooks","issue_events_url":"https://api.github.com/repos/drothlis/pytest/issues/events{/number}","events_url":"https://api.github.com/repos/drothlis/pytest/events","assignees_url":"https://api.github.com/repos/drothlis/pytest/assignees{/user}","branches_url":"https://api.github.com/repos/drothlis/pytest/branches{/branch}","tags_url":"https://api.github.com/repos/drothlis/pytest/tags","blobs_url":"https://api.github.com/repos/drothlis/pytest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/drothlis/pytest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/drothlis/pytest/git/refs{/sha}","trees_url":"https://api.github.com/repos/drothlis/pytest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/drothlis/pytest/statuses/{sha}","languages_url":"https://api.github.com/repos/drothlis/pytest/languages","stargazers_url":"https://api.github.com/repos/drothlis/pytest/stargazers","contributors_url":"https://api.github.com/repos/drothlis/pytest/contributors","subscribers_url":"https://api.github.com/repos/drothlis/pytest/subscribers","subscription_url":"https://api.github.com/repos/drothlis/pytest/subscription","commits_url":"https://api.github.com/repos/drothlis/pytest/commits{/sha}","git_commits_url":"https://api.github.com/repos/drothlis/pytest/git/commits{/sha}","comments_url":"https://api.github.com/repos/drothlis/pytest/comments{/number}","issue_comment_url":"https://api.github.com/repos/drothlis/pytest/issues/comments{/number}","contents_url":"https://api.github.com/repos/drothlis/pytest/contents/{+path}","compare_url":"https://api.github.com/repos/drothlis/pytest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/drothlis/pytest/merges","archive_url":"https://api.github.com/repos/drothlis/pytest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/drothlis/pytest/downloads","issues_url":"https://api.github.com/repos/drothlis/pytest/issues{/number}","pulls_url":"https://api.github.com/repos/drothlis/pytest/pulls{/number}","milestones_url":"https://api.github.com/repos/drothlis/pytest/milestones{/number}","notifications_url":"https://api.github.com/repos/drothlis/pytest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/drothlis/pytest/labels{/name}","releases_url":"https://api.github.com/repos/drothlis/pytest/releases{/id}","deployments_url":"https://api.github.com/repos/drothlis/pytest/deployments","created_at":"2019-05-23T15:47:55Z","updated_at":"2019-07-08T16:06:43Z","pushed_at":"2019-07-11T09:09:46Z","git_url":"git://github.com/drothlis/pytest.git","ssh_url":"git@github.com:drothlis/pytest.git","clone_url":"https://github.com/drothlis/pytest.git","svn_url":"https://github.com/drothlis/pytest","homepage":"https://pytest.org","size":17785,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pytest-dev:features","ref":"features","sha":"60a358fa2dc82a571c68d1be2d25703b51351538","user":{"login":"pytest-dev","id":8897583,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg4OTc1ODM=","avatar_url":"https://avatars2.githubusercontent.com/u/8897583?v=4","gravatar_id":"","url":"https://api.github.com/users/pytest-dev","html_url":"https://github.com/pytest-dev","followers_url":"https://api.github.com/users/pytest-dev/followers","following_url":"https://api.github.com/users/pytest-dev/following{/other_user}","gists_url":"https://api.github.com/users/pytest-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/pytest-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pytest-dev/subscriptions","organizations_url":"https://api.github.com/users/pytest-dev/orgs","repos_url":"https://api.github.com/users/pytest-dev/repos","events_url":"https://api.github.com/users/pytest-dev/events{/privacy}","received_events_url":"https://api.github.com/users/pytest-dev/received_events","type":"Organization","site_admin":false},"repo":{"id":37489525,"node_id":"MDEwOlJlcG9zaXRvcnkzNzQ4OTUyNQ==","name":"pytest","full_name":"pytest-dev/pytest","private":false,"owner":{"login":"pytest-dev","id":8897583,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg4OTc1ODM=","avatar_url":"https://avatars2.githubusercontent.com/u/8897583?v=4","gravatar_id":"","url":"https://api.github.com/users/pytest-dev","html_url":"https://github.com/pytest-dev","followers_url":"https://api.github.com/users/pytest-dev/followers","following_url":"https://api.github.com/users/pytest-dev/following{/other_user}","gists_url":"https://api.github.com/users/pytest-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/pytest-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pytest-dev/subscriptions","organizations_url":"https://api.github.com/users/pytest-dev/orgs","repos_url":"https://api.github.com/users/pytest-dev/repos","events_url":"https://api.github.com/users/pytest-dev/events{/privacy}","received_events_url":"https://api.github.com/users/pytest-dev/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pytest-dev/pytest","description":"The pytest framework makes it easy to write small tests, yet scales to support complex functional testing","fork":false,"url":"https://api.github.com/repos/pytest-dev/pytest","forks_url":"https://api.github.com/repos/pytest-dev/pytest/forks","keys_url":"https://api.github.com/repos/pytest-dev/pytest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pytest-dev/pytest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pytest-dev/pytest/teams","hooks_url":"https://api.github.com/repos/pytest-dev/pytest/hooks","issue_events_url":"https://api.github.com/repos/pytest-dev/pytest/issues/events{/number}","events_url":"https://api.github.com/repos/pytest-dev/pytest/events","assignees_url":"https://api.github.com/repos/pytest-dev/pytest/assignees{/user}","branches_url":"https://api.github.com/repos/pytest-dev/pytest/branches{/branch}","tags_url":"https://api.github.com/repos/pytest-dev/pytest/tags","blobs_url":"https://api.github.com/repos/pytest-dev/pytest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pytest-dev/pytest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pytest-dev/pytest/git/refs{/sha}","trees_url":"https://api.github.com/repos/pytest-dev/pytest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pytest-dev/pytest/statuses/{sha}","languages_url":"https://api.github.com/repos/pytest-dev/pytest/languages","stargazers_url":"https://api.github.com/repos/pytest-dev/pytest/stargazers","contributors_url":"https://api.github.com/repos/pytest-dev/pytest/contributors","subscribers_url":"https://api.github.com/repos/pytest-dev/pytest/subscribers","subscription_url":"https://api.github.com/repos/pytest-dev/pytest/subscription","commits_url":"https://api.github.com/repos/pytest-dev/pytest/commits{/sha}","git_commits_url":"https://api.github.com/repos/pytest-dev/pytest/git/commits{/sha}","comments_url":"https://api.github.com/repos/pytest-dev/pytest/comments{/number}","issue_comment_url":"https://api.github.com/repos/pytest-dev/pytest/issues/comments{/number}","contents_url":"https://api.github.com/repos/pytest-dev/pytest/contents/{+path}","compare_url":"https://api.github.com/repos/pytest-dev/pytest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pytest-dev/pytest/merges","archive_url":"https://api.github.com/repos/pytest-dev/pytest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pytest-dev/pytest/downloads","issues_url":"https://api.github.com/repos/pytest-dev/pytest/issues{/number}","pulls_url":"https://api.github.com/repos/pytest-dev/pytest/pulls{/number}","milestones_url":"https://api.github.com/repos/pytest-dev/pytest/milestones{/number}","notifications_url":"https://api.github.com/repos/pytest-dev/pytest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pytest-dev/pytest/labels{/name}","releases_url":"https://api.github.com/repos/pytest-dev/pytest/releases{/id}","deployments_url":"https://api.github.com/repos/pytest-dev/pytest/deployments","created_at":"2015-06-15T20:28:27Z","updated_at":"2019-07-11T10:05:46Z","pushed_at":"2019-07-11T10:25:38Z","git_url":"git://github.com/pytest-dev/pytest.git","ssh_url":"git@github.com:pytest-dev/pytest.git","clone_url":"https://github.com/pytest-dev/pytest.git","svn_url":"https://github.com/pytest-dev/pytest","homepage":"https://pytest.org","size":17897,"stargazers_count":4437,"watchers_count":4437,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1065,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":552,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1065,"open_issues":552,"watchers":4437,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pytest-dev/pytest/pulls/5576"},"html":{"href":"https://github.com/pytest-dev/pytest/pull/5576"},"issue":{"href":"https://api.github.com/repos/pytest-dev/pytest/issues/5576"},"comments":{"href":"https://api.github.com/repos/pytest-dev/pytest/issues/5576/comments"},"review_comments":{"href":"https://api.github.com/repos/pytest-dev/pytest/pulls/5576/comments"},"review_comment":{"href":"https://api.github.com/repos/pytest-dev/pytest/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pytest-dev/pytest/pulls/5576/commits"},"statuses":{"href":"https://api.github.com/repos/pytest-dev/pytest/statuses/a740ef20367bad2d401ab6ac0092d26bd2b62379"}},"author_association":"CONTRIBUTOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"nicoddemus","id":1085180,"node_id":"MDQ6VXNlcjEwODUxODA=","avatar_url":"https://avatars2.githubusercontent.com/u/1085180?v=4","gravatar_id":"","url":"https://api.github.com/users/nicoddemus","html_url":"https://github.com/nicoddemus","followers_url":"https://api.github.com/users/nicoddemus/followers","following_url":"https://api.github.com/users/nicoddemus/following{/other_user}","gists_url":"https://api.github.com/users/nicoddemus/gists{/gist_id}","starred_url":"https://api.github.com/users/nicoddemus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicoddemus/subscriptions","organizations_url":"https://api.github.com/users/nicoddemus/orgs","repos_url":"https://api.github.com/users/nicoddemus/repos","events_url":"https://api.github.com/users/nicoddemus/events{/privacy}","received_events_url":"https://api.github.com/users/nicoddemus/received_events","type":"User","site_admin":false},"comments":10,"review_comments":4,"maintainer_can_modify":false,"commits":5,"additions":283,"deletions":35,"changed_files":5}}
{"actor":{"display_login":"nicoddemus"}}