{"action":"created","issue":{"url":"https://api.github.com/repos/schollii/pypubsub/issues/14","repository_url":"https://api.github.com/repos/schollii/pypubsub","labels_url":"https://api.github.com/repos/schollii/pypubsub/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/schollii/pypubsub/issues/14/comments","events_url":"https://api.github.com/repos/schollii/pypubsub/issues/14/events","html_url":"https://github.com/schollii/pypubsub/issues/14","id":351723989,"node_id":"MDU6SXNzdWUzNTE3MjM5ODk=","number":14,"title":"Tests are confusing and non-intuitive to run, requiring magic incantations.","user":{"login":"eli-schwartz","id":6551424,"node_id":"MDQ6VXNlcjY1NTE0MjQ=","avatar_url":"https://avatars1.githubusercontent.com/u/6551424?v=4","gravatar_id":"","url":"https://api.github.com/users/eli-schwartz","html_url":"https://github.com/eli-schwartz","followers_url":"https://api.github.com/users/eli-schwartz/followers","following_url":"https://api.github.com/users/eli-schwartz/following{/other_user}","gists_url":"https://api.github.com/users/eli-schwartz/gists{/gist_id}","starred_url":"https://api.github.com/users/eli-schwartz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eli-schwartz/subscriptions","organizations_url":"https://api.github.com/users/eli-schwartz/orgs","repos_url":"https://api.github.com/users/eli-schwartz/repos","events_url":"https://api.github.com/users/eli-schwartz/events{/privacy}","received_events_url":"https://api.github.com/users/eli-schwartz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-17T20:12:31Z","updated_at":"2018-08-17T20:39:56Z","closed_at":null,"author_association":"NONE","body":"- it depends on the current working directory that pytest is run from, because things like `open('test4_prov_module_actual.py', 'r')` and `self._parse_tree(_get_elem(open(xml, mode=\"r\")` (where xml is **just** \"xmlprovider_topics.xml\"), instead of using `os.path.join(os.path.dirname(__file__), 'xmlprovider_topics.xml'`)\r\n- src/pypubsub is not autodetected and added to the PYTHONPATH, whereas the common custom of using \"modulename\" as a directory in the root directory of the repository, would work fine.\r\n- using tests/suite/ as the test directory, instead of just tests/, means pytest needs to be explicitly passed the test directory, instead of just detecting it automatically.\r\n\r\nThe ideal case would be that one could `git clone https://github.com/schollii/pypubsub && cd pypubsub && python -m pytest` and everything would just work without a fuss.\r\nCurrently it instead requires an additional `cd tests/suite && PYTHONPATH=$PWD../../src/ python -m pytest` for no discernable reason."},"comment":{"url":"https://api.github.com/repos/schollii/pypubsub/issues/comments/413982256","html_url":"https://github.com/schollii/pypubsub/issues/14#issuecomment-413982256","issue_url":"https://api.github.com/repos/schollii/pypubsub/issues/14","id":413982256,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMzk4MjI1Ng==","user":{"login":"schollii","id":2598808,"node_id":"MDQ6VXNlcjI1OTg4MDg=","avatar_url":"https://avatars2.githubusercontent.com/u/2598808?v=4","gravatar_id":"","url":"https://api.github.com/users/schollii","html_url":"https://github.com/schollii","followers_url":"https://api.github.com/users/schollii/followers","following_url":"https://api.github.com/users/schollii/following{/other_user}","gists_url":"https://api.github.com/users/schollii/gists{/gist_id}","starred_url":"https://api.github.com/users/schollii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schollii/subscriptions","organizations_url":"https://api.github.com/users/schollii/orgs","repos_url":"https://api.github.com/users/schollii/repos","events_url":"https://api.github.com/users/schollii/events{/privacy}","received_events_url":"https://api.github.com/users/schollii/received_events","type":"User","site_admin":false},"created_at":"2018-08-17T20:39:56Z","updated_at":"2018-08-17T20:39:56Z","author_association":"OWNER","body":"Apart from the title of the issue, excellent points ;)  Let's just agree that your use case would be easier to handle if the tests were setup differently. My recommendation is for you to fork, adjust to cover your use-case, submit PR. Don't forget to test with tox. "}}
{"actor":{"display_login":"schollii"}}