{"action":"closed","number":8,"pull_request":{"url":"https://api.github.com/repos/IainNZ/Pukeko.jl/pulls/8","id":215070565,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE1MDcwNTY1","html_url":"https://github.com/IainNZ/Pukeko.jl/pull/8","diff_url":"https://github.com/IainNZ/Pukeko.jl/pull/8.diff","patch_url":"https://github.com/IainNZ/Pukeko.jl/pull/8.patch","issue_url":"https://api.github.com/repos/IainNZ/Pukeko.jl/issues/8","number":8,"state":"closed","locked":false,"title":"Add line info for TestExceptions","user":{"login":"KristofferC","id":1282691,"node_id":"MDQ6VXNlcjEyODI2OTE=","avatar_url":"https://avatars1.githubusercontent.com/u/1282691?v=4","gravatar_id":"","url":"https://api.github.com/users/KristofferC","html_url":"https://github.com/KristofferC","followers_url":"https://api.github.com/users/KristofferC/followers","following_url":"https://api.github.com/users/KristofferC/following{/other_user}","gists_url":"https://api.github.com/users/KristofferC/gists{/gist_id}","starred_url":"https://api.github.com/users/KristofferC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KristofferC/subscriptions","organizations_url":"https://api.github.com/users/KristofferC/orgs","repos_url":"https://api.github.com/users/KristofferC/repos","events_url":"https://api.github.com/users/KristofferC/events{/privacy}","received_events_url":"https://api.github.com/users/KristofferC/received_events","type":"User","site_admin":false},"body":"Collects the file and line using the \"hidden\" `__source__` argument to the test macro and use that when printing TestExceptions e.g.\r\n\r\n```\r\n test_fail: runtests.jl:68 Expression did not evaluate to `true`: 1 != 2\r\n```\r\n\r\nPrinting is not optimal but this is mostly a proof of concept.\r\n\r\nAlso, one question regarding the implementation of this package. Right now, a lot of state is passed by throwing and catching exception, e.g.\r\n\r\n```jl\r\nfunction test_true(value)\r\n    if value != true\r\n        throw(TestException(\"Expression did not evaluate to `true`: \" *\r\n                            string(value)))\r\n    end\r\n    return nothing\r\nend\r\n```\r\n\r\nHere the value that was evaluated is stored inside an exception. So instead of having stateful exceptions flying around could it be worth to delay throwing here and just do emit\r\n\r\n```\r\nstruct TestResult\r\n    expr::Expr\r\n    evaluated_to::Any\r\n    ...\r\nend\r\n```\r\n\r\nand then decide later how it should be thrown and printed. The only thing that we would need to catch is an unexpected exception being thrown.\r\n\r\n","created_at":"2018-09-12T19:30:16Z","updated_at":"2018-09-14T02:36:35Z","closed_at":"2018-09-14T02:36:35Z","merged_at":null,"merge_commit_sha":"2f08d2c68acb499d5ea6c78f10fcb7f6d3834e35","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/IainNZ/Pukeko.jl/pulls/8/commits","review_comments_url":"https://api.github.com/repos/IainNZ/Pukeko.jl/pulls/8/comments","review_comment_url":"https://api.github.com/repos/IainNZ/Pukeko.jl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/IainNZ/Pukeko.jl/issues/8/comments","statuses_url":"https://api.github.com/repos/IainNZ/Pukeko.jl/statuses/e7116d706902c3d40cf912fcd6d53ec659e95f18","head":{"label":"KristofferC:kc/linfo","ref":"kc/linfo","sha":"e7116d706902c3d40cf912fcd6d53ec659e95f18","user":{"login":"KristofferC","id":1282691,"node_id":"MDQ6VXNlcjEyODI2OTE=","avatar_url":"https://avatars1.githubusercontent.com/u/1282691?v=4","gravatar_id":"","url":"https://api.github.com/users/KristofferC","html_url":"https://github.com/KristofferC","followers_url":"https://api.github.com/users/KristofferC/followers","following_url":"https://api.github.com/users/KristofferC/following{/other_user}","gists_url":"https://api.github.com/users/KristofferC/gists{/gist_id}","starred_url":"https://api.github.com/users/KristofferC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KristofferC/subscriptions","organizations_url":"https://api.github.com/users/KristofferC/orgs","repos_url":"https://api.github.com/users/KristofferC/repos","events_url":"https://api.github.com/users/KristofferC/events{/privacy}","received_events_url":"https://api.github.com/users/KristofferC/received_events","type":"User","site_admin":false},"repo":{"id":148360448,"node_id":"MDEwOlJlcG9zaXRvcnkxNDgzNjA0NDg=","name":"Pukeko.jl","full_name":"KristofferC/Pukeko.jl","owner":{"login":"KristofferC","id":1282691,"node_id":"MDQ6VXNlcjEyODI2OTE=","avatar_url":"https://avatars1.githubusercontent.com/u/1282691?v=4","gravatar_id":"","url":"https://api.github.com/users/KristofferC","html_url":"https://github.com/KristofferC","followers_url":"https://api.github.com/users/KristofferC/followers","following_url":"https://api.github.com/users/KristofferC/following{/other_user}","gists_url":"https://api.github.com/users/KristofferC/gists{/gist_id}","starred_url":"https://api.github.com/users/KristofferC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KristofferC/subscriptions","organizations_url":"https://api.github.com/users/KristofferC/orgs","repos_url":"https://api.github.com/users/KristofferC/repos","events_url":"https://api.github.com/users/KristofferC/events{/privacy}","received_events_url":"https://api.github.com/users/KristofferC/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/KristofferC/Pukeko.jl","description":"Testing for Julia, simplified.","fork":true,"url":"https://api.github.com/repos/KristofferC/Pukeko.jl","forks_url":"https://api.github.com/repos/KristofferC/Pukeko.jl/forks","keys_url":"https://api.github.com/repos/KristofferC/Pukeko.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KristofferC/Pukeko.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KristofferC/Pukeko.jl/teams","hooks_url":"https://api.github.com/repos/KristofferC/Pukeko.jl/hooks","issue_events_url":"https://api.github.com/repos/KristofferC/Pukeko.jl/issues/events{/number}","events_url":"https://api.github.com/repos/KristofferC/Pukeko.jl/events","assignees_url":"https://api.github.com/repos/KristofferC/Pukeko.jl/assignees{/user}","branches_url":"https://api.github.com/repos/KristofferC/Pukeko.jl/branches{/branch}","tags_url":"https://api.github.com/repos/KristofferC/Pukeko.jl/tags","blobs_url":"https://api.github.com/repos/KristofferC/Pukeko.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KristofferC/Pukeko.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KristofferC/Pukeko.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/KristofferC/Pukeko.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KristofferC/Pukeko.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/KristofferC/Pukeko.jl/languages","stargazers_url":"https://api.github.com/repos/KristofferC/Pukeko.jl/stargazers","contributors_url":"https://api.github.com/repos/KristofferC/Pukeko.jl/contributors","subscribers_url":"https://api.github.com/repos/KristofferC/Pukeko.jl/subscribers","subscription_url":"https://api.github.com/repos/KristofferC/Pukeko.jl/subscription","commits_url":"https://api.github.com/repos/KristofferC/Pukeko.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/KristofferC/Pukeko.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/KristofferC/Pukeko.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/KristofferC/Pukeko.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/KristofferC/Pukeko.jl/contents/{+path}","compare_url":"https://api.github.com/repos/KristofferC/Pukeko.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KristofferC/Pukeko.jl/merges","archive_url":"https://api.github.com/repos/KristofferC/Pukeko.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KristofferC/Pukeko.jl/downloads","issues_url":"https://api.github.com/repos/KristofferC/Pukeko.jl/issues{/number}","pulls_url":"https://api.github.com/repos/KristofferC/Pukeko.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/KristofferC/Pukeko.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/KristofferC/Pukeko.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KristofferC/Pukeko.jl/labels{/name}","releases_url":"https://api.github.com/repos/KristofferC/Pukeko.jl/releases{/id}","deployments_url":"https://api.github.com/repos/KristofferC/Pukeko.jl/deployments","created_at":"2018-09-11T18:19:04Z","updated_at":"2018-09-11T18:19:06Z","pushed_at":"2018-09-13T00:49:24Z","git_url":"git://github.com/KristofferC/Pukeko.jl.git","ssh_url":"git@github.com:KristofferC/Pukeko.jl.git","clone_url":"https://github.com/KristofferC/Pukeko.jl.git","svn_url":"https://github.com/KristofferC/Pukeko.jl","homepage":null,"size":74,"stargazers_count":0,"watchers_count":0,"language":"Julia","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":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":"IainNZ:master","ref":"master","sha":"d92402aaf8ce4d4b48f5542f6053b5210f12cef6","user":{"login":"IainNZ","id":692635,"node_id":"MDQ6VXNlcjY5MjYzNQ==","avatar_url":"https://avatars2.githubusercontent.com/u/692635?v=4","gravatar_id":"","url":"https://api.github.com/users/IainNZ","html_url":"https://github.com/IainNZ","followers_url":"https://api.github.com/users/IainNZ/followers","following_url":"https://api.github.com/users/IainNZ/following{/other_user}","gists_url":"https://api.github.com/users/IainNZ/gists{/gist_id}","starred_url":"https://api.github.com/users/IainNZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IainNZ/subscriptions","organizations_url":"https://api.github.com/users/IainNZ/orgs","repos_url":"https://api.github.com/users/IainNZ/repos","events_url":"https://api.github.com/users/IainNZ/events{/privacy}","received_events_url":"https://api.github.com/users/IainNZ/received_events","type":"User","site_admin":false},"repo":{"id":147268394,"node_id":"MDEwOlJlcG9zaXRvcnkxNDcyNjgzOTQ=","name":"Pukeko.jl","full_name":"IainNZ/Pukeko.jl","owner":{"login":"IainNZ","id":692635,"node_id":"MDQ6VXNlcjY5MjYzNQ==","avatar_url":"https://avatars2.githubusercontent.com/u/692635?v=4","gravatar_id":"","url":"https://api.github.com/users/IainNZ","html_url":"https://github.com/IainNZ","followers_url":"https://api.github.com/users/IainNZ/followers","following_url":"https://api.github.com/users/IainNZ/following{/other_user}","gists_url":"https://api.github.com/users/IainNZ/gists{/gist_id}","starred_url":"https://api.github.com/users/IainNZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IainNZ/subscriptions","organizations_url":"https://api.github.com/users/IainNZ/orgs","repos_url":"https://api.github.com/users/IainNZ/repos","events_url":"https://api.github.com/users/IainNZ/events{/privacy}","received_events_url":"https://api.github.com/users/IainNZ/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/IainNZ/Pukeko.jl","description":"Testing for Julia, simplified.","fork":false,"url":"https://api.github.com/repos/IainNZ/Pukeko.jl","forks_url":"https://api.github.com/repos/IainNZ/Pukeko.jl/forks","keys_url":"https://api.github.com/repos/IainNZ/Pukeko.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/IainNZ/Pukeko.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/IainNZ/Pukeko.jl/teams","hooks_url":"https://api.github.com/repos/IainNZ/Pukeko.jl/hooks","issue_events_url":"https://api.github.com/repos/IainNZ/Pukeko.jl/issues/events{/number}","events_url":"https://api.github.com/repos/IainNZ/Pukeko.jl/events","assignees_url":"https://api.github.com/repos/IainNZ/Pukeko.jl/assignees{/user}","branches_url":"https://api.github.com/repos/IainNZ/Pukeko.jl/branches{/branch}","tags_url":"https://api.github.com/repos/IainNZ/Pukeko.jl/tags","blobs_url":"https://api.github.com/repos/IainNZ/Pukeko.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/IainNZ/Pukeko.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/IainNZ/Pukeko.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/IainNZ/Pukeko.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/IainNZ/Pukeko.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/IainNZ/Pukeko.jl/languages","stargazers_url":"https://api.github.com/repos/IainNZ/Pukeko.jl/stargazers","contributors_url":"https://api.github.com/repos/IainNZ/Pukeko.jl/contributors","subscribers_url":"https://api.github.com/repos/IainNZ/Pukeko.jl/subscribers","subscription_url":"https://api.github.com/repos/IainNZ/Pukeko.jl/subscription","commits_url":"https://api.github.com/repos/IainNZ/Pukeko.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/IainNZ/Pukeko.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/IainNZ/Pukeko.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/IainNZ/Pukeko.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/IainNZ/Pukeko.jl/contents/{+path}","compare_url":"https://api.github.com/repos/IainNZ/Pukeko.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/IainNZ/Pukeko.jl/merges","archive_url":"https://api.github.com/repos/IainNZ/Pukeko.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/IainNZ/Pukeko.jl/downloads","issues_url":"https://api.github.com/repos/IainNZ/Pukeko.jl/issues{/number}","pulls_url":"https://api.github.com/repos/IainNZ/Pukeko.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/IainNZ/Pukeko.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/IainNZ/Pukeko.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/IainNZ/Pukeko.jl/labels{/name}","releases_url":"https://api.github.com/repos/IainNZ/Pukeko.jl/releases{/id}","deployments_url":"https://api.github.com/repos/IainNZ/Pukeko.jl/deployments","created_at":"2018-09-04T00:54:17Z","updated_at":"2018-09-12T20:44:11Z","pushed_at":"2018-09-13T00:49:25Z","git_url":"git://github.com/IainNZ/Pukeko.jl.git","ssh_url":"git@github.com:IainNZ/Pukeko.jl.git","clone_url":"https://github.com/IainNZ/Pukeko.jl.git","svn_url":"https://github.com/IainNZ/Pukeko.jl","homepage":null,"size":72,"stargazers_count":6,"watchers_count":6,"language":"Julia","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":3,"open_issues":4,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/IainNZ/Pukeko.jl/pulls/8"},"html":{"href":"https://github.com/IainNZ/Pukeko.jl/pull/8"},"issue":{"href":"https://api.github.com/repos/IainNZ/Pukeko.jl/issues/8"},"comments":{"href":"https://api.github.com/repos/IainNZ/Pukeko.jl/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/IainNZ/Pukeko.jl/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/IainNZ/Pukeko.jl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/IainNZ/Pukeko.jl/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/IainNZ/Pukeko.jl/statuses/e7116d706902c3d40cf912fcd6d53ec659e95f18"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":true,"rebaseable":true,"mergeable_state":"clean","merged_by":null,"comments":10,"review_comments":0,"maintainer_can_modify":false,"commits":2,"additions":31,"deletions":13,"changed_files":1}}
{"actor":{"display_login":"IainNZ"}}