{"action":"opened","number":392,"pull_request":{"url":"https://api.github.com/repos/nose-devs/nose2/pulls/392","id":184476452,"html_url":"https://github.com/nose-devs/nose2/pull/392","diff_url":"https://github.com/nose-devs/nose2/pull/392.diff","patch_url":"https://github.com/nose-devs/nose2/pull/392.patch","issue_url":"https://api.github.com/repos/nose-devs/nose2/issues/392","number":392,"state":"open","locked":false,"title":"junitxml: Use test module in place of classname if no classname exists","user":{"login":"rhelmot","id":2498805,"avatar_url":"https://avatars1.githubusercontent.com/u/2498805?v=4","gravatar_id":"","url":"https://api.github.com/users/rhelmot","html_url":"https://github.com/rhelmot","followers_url":"https://api.github.com/users/rhelmot/followers","following_url":"https://api.github.com/users/rhelmot/following{/other_user}","gists_url":"https://api.github.com/users/rhelmot/gists{/gist_id}","starred_url":"https://api.github.com/users/rhelmot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhelmot/subscriptions","organizations_url":"https://api.github.com/users/rhelmot/orgs","repos_url":"https://api.github.com/users/rhelmot/repos","events_url":"https://api.github.com/users/rhelmot/events{/privacy}","received_events_url":"https://api.github.com/users/rhelmot/received_events","type":"User","site_admin":false},"body":"I noticed an issue that the xml output for ordinary function testcases has absolutely no indication for what file the test was written in, while the generator testcases have a classname marked as the name of the module. imo the latter is desirable behavior, so I've tried to replicate it for ordinary testcases.\r\n\r\nFor one of my testcases named `test_crosspage_read` in a file named `test_memory.py`, this PR changes the XML output from this:\r\n\r\n```\r\n <testcase classname=\"\" name=\"test_crosspage_read\" time=\"0.026392\">\r\n   <system-out/>\r\n </testcase>\r\n```\r\n\r\nto this:\r\n\r\n```\r\n  <testcase classname=\"test_memory\" name=\"test_crosspage_read\" time=\"0.042382\">\r\n    <system-out />\r\n  </testcase>\r\n```","created_at":"2018-04-26T22:04:13Z","updated_at":"2018-04-26T22:04:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/nose-devs/nose2/pulls/392/commits","review_comments_url":"https://api.github.com/repos/nose-devs/nose2/pulls/392/comments","review_comment_url":"https://api.github.com/repos/nose-devs/nose2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nose-devs/nose2/issues/392/comments","statuses_url":"https://api.github.com/repos/nose-devs/nose2/statuses/5c3e9a56f808db2792ac7180f42bd063f29d397d","head":{"label":"rhelmot:master","ref":"master","sha":"5c3e9a56f808db2792ac7180f42bd063f29d397d","user":{"login":"rhelmot","id":2498805,"avatar_url":"https://avatars1.githubusercontent.com/u/2498805?v=4","gravatar_id":"","url":"https://api.github.com/users/rhelmot","html_url":"https://github.com/rhelmot","followers_url":"https://api.github.com/users/rhelmot/followers","following_url":"https://api.github.com/users/rhelmot/following{/other_user}","gists_url":"https://api.github.com/users/rhelmot/gists{/gist_id}","starred_url":"https://api.github.com/users/rhelmot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhelmot/subscriptions","organizations_url":"https://api.github.com/users/rhelmot/orgs","repos_url":"https://api.github.com/users/rhelmot/repos","events_url":"https://api.github.com/users/rhelmot/events{/privacy}","received_events_url":"https://api.github.com/users/rhelmot/received_events","type":"User","site_admin":false},"repo":{"id":131214809,"name":"nose2","full_name":"rhelmot/nose2","owner":{"login":"rhelmot","id":2498805,"avatar_url":"https://avatars1.githubusercontent.com/u/2498805?v=4","gravatar_id":"","url":"https://api.github.com/users/rhelmot","html_url":"https://github.com/rhelmot","followers_url":"https://api.github.com/users/rhelmot/followers","following_url":"https://api.github.com/users/rhelmot/following{/other_user}","gists_url":"https://api.github.com/users/rhelmot/gists{/gist_id}","starred_url":"https://api.github.com/users/rhelmot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhelmot/subscriptions","organizations_url":"https://api.github.com/users/rhelmot/orgs","repos_url":"https://api.github.com/users/rhelmot/repos","events_url":"https://api.github.com/users/rhelmot/events{/privacy}","received_events_url":"https://api.github.com/users/rhelmot/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rhelmot/nose2","description":"The successor to nose, based on unittest2","fork":true,"url":"https://api.github.com/repos/rhelmot/nose2","forks_url":"https://api.github.com/repos/rhelmot/nose2/forks","keys_url":"https://api.github.com/repos/rhelmot/nose2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rhelmot/nose2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rhelmot/nose2/teams","hooks_url":"https://api.github.com/repos/rhelmot/nose2/hooks","issue_events_url":"https://api.github.com/repos/rhelmot/nose2/issues/events{/number}","events_url":"https://api.github.com/repos/rhelmot/nose2/events","assignees_url":"https://api.github.com/repos/rhelmot/nose2/assignees{/user}","branches_url":"https://api.github.com/repos/rhelmot/nose2/branches{/branch}","tags_url":"https://api.github.com/repos/rhelmot/nose2/tags","blobs_url":"https://api.github.com/repos/rhelmot/nose2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rhelmot/nose2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rhelmot/nose2/git/refs{/sha}","trees_url":"https://api.github.com/repos/rhelmot/nose2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rhelmot/nose2/statuses/{sha}","languages_url":"https://api.github.com/repos/rhelmot/nose2/languages","stargazers_url":"https://api.github.com/repos/rhelmot/nose2/stargazers","contributors_url":"https://api.github.com/repos/rhelmot/nose2/contributors","subscribers_url":"https://api.github.com/repos/rhelmot/nose2/subscribers","subscription_url":"https://api.github.com/repos/rhelmot/nose2/subscription","commits_url":"https://api.github.com/repos/rhelmot/nose2/commits{/sha}","git_commits_url":"https://api.github.com/repos/rhelmot/nose2/git/commits{/sha}","comments_url":"https://api.github.com/repos/rhelmot/nose2/comments{/number}","issue_comment_url":"https://api.github.com/repos/rhelmot/nose2/issues/comments{/number}","contents_url":"https://api.github.com/repos/rhelmot/nose2/contents/{+path}","compare_url":"https://api.github.com/repos/rhelmot/nose2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rhelmot/nose2/merges","archive_url":"https://api.github.com/repos/rhelmot/nose2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rhelmot/nose2/downloads","issues_url":"https://api.github.com/repos/rhelmot/nose2/issues{/number}","pulls_url":"https://api.github.com/repos/rhelmot/nose2/pulls{/number}","milestones_url":"https://api.github.com/repos/rhelmot/nose2/milestones{/number}","notifications_url":"https://api.github.com/repos/rhelmot/nose2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rhelmot/nose2/labels{/name}","releases_url":"https://api.github.com/repos/rhelmot/nose2/releases{/id}","deployments_url":"https://api.github.com/repos/rhelmot/nose2/deployments","created_at":"2018-04-26T21:55:38Z","updated_at":"2018-04-26T21:56:19Z","pushed_at":"2018-04-26T21:56:18Z","git_url":"git://github.com/rhelmot/nose2.git","ssh_url":"git@github.com:rhelmot/nose2.git","clone_url":"https://github.com/rhelmot/nose2.git","svn_url":"https://github.com/rhelmot/nose2","homepage":"https://nose2.readthedocs.io/en/latest","size":1532,"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,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"nose-devs:master","ref":"master","sha":"8dee3a23b85837b419a9bd06601b80021e7ca8e4","user":{"login":"nose-devs","id":1263082,"avatar_url":"https://avatars2.githubusercontent.com/u/1263082?v=4","gravatar_id":"","url":"https://api.github.com/users/nose-devs","html_url":"https://github.com/nose-devs","followers_url":"https://api.github.com/users/nose-devs/followers","following_url":"https://api.github.com/users/nose-devs/following{/other_user}","gists_url":"https://api.github.com/users/nose-devs/gists{/gist_id}","starred_url":"https://api.github.com/users/nose-devs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nose-devs/subscriptions","organizations_url":"https://api.github.com/users/nose-devs/orgs","repos_url":"https://api.github.com/users/nose-devs/repos","events_url":"https://api.github.com/users/nose-devs/events{/privacy}","received_events_url":"https://api.github.com/users/nose-devs/received_events","type":"Organization","site_admin":false},"repo":{"id":2980827,"name":"nose2","full_name":"nose-devs/nose2","owner":{"login":"nose-devs","id":1263082,"avatar_url":"https://avatars2.githubusercontent.com/u/1263082?v=4","gravatar_id":"","url":"https://api.github.com/users/nose-devs","html_url":"https://github.com/nose-devs","followers_url":"https://api.github.com/users/nose-devs/followers","following_url":"https://api.github.com/users/nose-devs/following{/other_user}","gists_url":"https://api.github.com/users/nose-devs/gists{/gist_id}","starred_url":"https://api.github.com/users/nose-devs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nose-devs/subscriptions","organizations_url":"https://api.github.com/users/nose-devs/orgs","repos_url":"https://api.github.com/users/nose-devs/repos","events_url":"https://api.github.com/users/nose-devs/events{/privacy}","received_events_url":"https://api.github.com/users/nose-devs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nose-devs/nose2","description":"The successor to nose, based on unittest2","fork":false,"url":"https://api.github.com/repos/nose-devs/nose2","forks_url":"https://api.github.com/repos/nose-devs/nose2/forks","keys_url":"https://api.github.com/repos/nose-devs/nose2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nose-devs/nose2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nose-devs/nose2/teams","hooks_url":"https://api.github.com/repos/nose-devs/nose2/hooks","issue_events_url":"https://api.github.com/repos/nose-devs/nose2/issues/events{/number}","events_url":"https://api.github.com/repos/nose-devs/nose2/events","assignees_url":"https://api.github.com/repos/nose-devs/nose2/assignees{/user}","branches_url":"https://api.github.com/repos/nose-devs/nose2/branches{/branch}","tags_url":"https://api.github.com/repos/nose-devs/nose2/tags","blobs_url":"https://api.github.com/repos/nose-devs/nose2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nose-devs/nose2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nose-devs/nose2/git/refs{/sha}","trees_url":"https://api.github.com/repos/nose-devs/nose2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nose-devs/nose2/statuses/{sha}","languages_url":"https://api.github.com/repos/nose-devs/nose2/languages","stargazers_url":"https://api.github.com/repos/nose-devs/nose2/stargazers","contributors_url":"https://api.github.com/repos/nose-devs/nose2/contributors","subscribers_url":"https://api.github.com/repos/nose-devs/nose2/subscribers","subscription_url":"https://api.github.com/repos/nose-devs/nose2/subscription","commits_url":"https://api.github.com/repos/nose-devs/nose2/commits{/sha}","git_commits_url":"https://api.github.com/repos/nose-devs/nose2/git/commits{/sha}","comments_url":"https://api.github.com/repos/nose-devs/nose2/comments{/number}","issue_comment_url":"https://api.github.com/repos/nose-devs/nose2/issues/comments{/number}","contents_url":"https://api.github.com/repos/nose-devs/nose2/contents/{+path}","compare_url":"https://api.github.com/repos/nose-devs/nose2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nose-devs/nose2/merges","archive_url":"https://api.github.com/repos/nose-devs/nose2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nose-devs/nose2/downloads","issues_url":"https://api.github.com/repos/nose-devs/nose2/issues{/number}","pulls_url":"https://api.github.com/repos/nose-devs/nose2/pulls{/number}","milestones_url":"https://api.github.com/repos/nose-devs/nose2/milestones{/number}","notifications_url":"https://api.github.com/repos/nose-devs/nose2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nose-devs/nose2/labels{/name}","releases_url":"https://api.github.com/repos/nose-devs/nose2/releases{/id}","deployments_url":"https://api.github.com/repos/nose-devs/nose2/deployments","created_at":"2011-12-14T15:33:15Z","updated_at":"2018-04-23T21:31:13Z","pushed_at":"2018-04-01T20:30:58Z","git_url":"git://github.com/nose-devs/nose2.git","ssh_url":"git@github.com:nose-devs/nose2.git","clone_url":"https://github.com/nose-devs/nose2.git","svn_url":"https://github.com/nose-devs/nose2","homepage":"https://nose2.readthedocs.io/en/latest","size":1532,"stargazers_count":443,"watchers_count":443,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":102,"mirror_url":null,"archived":false,"open_issues_count":64,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":102,"open_issues":64,"watchers":443,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nose-devs/nose2/pulls/392"},"html":{"href":"https://github.com/nose-devs/nose2/pull/392"},"issue":{"href":"https://api.github.com/repos/nose-devs/nose2/issues/392"},"comments":{"href":"https://api.github.com/repos/nose-devs/nose2/issues/392/comments"},"review_comments":{"href":"https://api.github.com/repos/nose-devs/nose2/pulls/392/comments"},"review_comment":{"href":"https://api.github.com/repos/nose-devs/nose2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nose-devs/nose2/pulls/392/commits"},"statuses":{"href":"https://api.github.com/repos/nose-devs/nose2/statuses/5c3e9a56f808db2792ac7180f42bd063f29d397d"}},"author_association":"NONE","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":2,"deletions":0,"changed_files":1}}
{"actor":{"display_login":"rhelmot"}}