{"action":"created","issue":{"url":"https://api.github.com/repos/kennethreitz/requests/issues/2991","repository_url":"https://api.github.com/repos/kennethreitz/requests","labels_url":"https://api.github.com/repos/kennethreitz/requests/issues/2991/labels{/name}","comments_url":"https://api.github.com/repos/kennethreitz/requests/issues/2991/comments","events_url":"https://api.github.com/repos/kennethreitz/requests/issues/2991/events","html_url":"https://github.com/kennethreitz/requests/pull/2991","id":130677837,"number":2991,"title":"[WIP] Test suite refactoring","user":{"login":"Stranger6667","id":1236561,"avatar_url":"https://avatars.githubusercontent.com/u/1236561?v=3","gravatar_id":"","url":"https://api.github.com/users/Stranger6667","html_url":"https://github.com/Stranger6667","followers_url":"https://api.github.com/users/Stranger6667/followers","following_url":"https://api.github.com/users/Stranger6667/following{/other_user}","gists_url":"https://api.github.com/users/Stranger6667/gists{/gist_id}","starred_url":"https://api.github.com/users/Stranger6667/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stranger6667/subscriptions","organizations_url":"https://api.github.com/users/Stranger6667/orgs","repos_url":"https://api.github.com/users/Stranger6667/repos","events_url":"https://api.github.com/users/Stranger6667/events{/privacy}","received_events_url":"https://api.github.com/users/Stranger6667/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-02-02T13:04:14Z","updated_at":"2016-02-03T08:44:38Z","closed_at":"2016-02-03T08:26:27Z","pull_request":{"url":"https://api.github.com/repos/kennethreitz/requests/pulls/2991","html_url":"https://github.com/kennethreitz/requests/pull/2991","diff_url":"https://github.com/kennethreitz/requests/pull/2991.diff","patch_url":"https://github.com/kennethreitz/requests/pull/2991.patch"},"body":"Hello, I'd like to propose some refactorings for current test suite. First of all it is more about testing convenience, to make development process easier.\r\n\r\nCurrent changes:\r\n- Changed test running to setup.py. It allows to use some tuning on dependencies during test runs\r\n- Updated classifiers list. All tests run fine on Python 2.6 and PyPy. And almost all on Jython. I think it will not be a problem to deal with 2 failing tests, but will see.\r\n- Added config file for coverage. But I'm not sure about omitting \"*/packages/*\".\r\n- Added tox.ini to run tests against different Python versions locally.\r\n- Removed `unittest` from tests. It is not required for `py.test`. Also I've removed `_multiprocess_can_split_` because it is only related to `nose`.\r\n- Added some of py.test parametrization.\r\n- Replaced `assert False` with `pytest.fail`.\r\n- Fixed typo and added some minor improvements.\r\n\r\nSome thoughts and questions:\r\n- Coverage report shows, that code [here](https://github.com/kennethreitz/requests/compare/master...Stranger6667:tests-refactoring?expand=1#diff-56c2d754173a4a158ce8f445834c8fe8R616) is not executed. So, is there problem in hooks execution?\r\n- Split test module to some logically separated files. Current file is kind of huge. May be it will be better to have test suite in multiply files?\r\n- Python 3.2. Basically all tests pass on Python 3.2 / PyPy3 (based on Python 3.2). But `httpbin` dependency is not compatible with this Python version. But `requests` seems to be compatible. Any plans to keep compatibility with Python 3.2? May be rewrite some tests for Python 3.2 or something?\r\n- Jython. Most things are OK on Jython. Only 2 tests are failing - `TestRequests.test_pyopenssl_redirect` and `TestMorselToCookieExpires.test_expires_valid_str`. I don't know detail yet, but I hope, that it won't be a problem to fix it. Is it reasonable to run test suite against Jython? \r\n- Travis CI. I saw some CI-related lines in `Makefile`, but I don't see any info about in docs. Can you help me here? Also I can add some Travis CI config to run all configurations on it (including Jython)\r\n- Public coverage report. May I add some `codecov/coveralls` integration? Will it be helpful?\r\n\r\nIt is not a complete lists and I'll be glad to hear what do you think about it. Also I'll be happy to write more tests here :)\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/kennethreitz/requests/issues/comments/179095012","html_url":"https://github.com/kennethreitz/requests/pull/2991#issuecomment-179095012","issue_url":"https://api.github.com/repos/kennethreitz/requests/issues/2991","id":179095012,"user":{"login":"kennethreitz","id":119893,"avatar_url":"https://avatars.githubusercontent.com/u/119893?v=3","gravatar_id":"","url":"https://api.github.com/users/kennethreitz","html_url":"https://github.com/kennethreitz","followers_url":"https://api.github.com/users/kennethreitz/followers","following_url":"https://api.github.com/users/kennethreitz/following{/other_user}","gists_url":"https://api.github.com/users/kennethreitz/gists{/gist_id}","starred_url":"https://api.github.com/users/kennethreitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kennethreitz/subscriptions","organizations_url":"https://api.github.com/users/kennethreitz/orgs","repos_url":"https://api.github.com/users/kennethreitz/repos","events_url":"https://api.github.com/users/kennethreitz/events{/privacy}","received_events_url":"https://api.github.com/users/kennethreitz/received_events","type":"User","site_admin":false},"created_at":"2016-02-03T08:44:38Z","updated_at":"2016-02-03T08:44:38Z","body":"Merged. Made some changes. \r\n\r\n- Removed `.coveragerc` (this may be useful to add later).\r\n- Removed `tox.ini`, see above.\r\n- Changed the recommended way to run tests (`$ make tests`) back to using `$ py.test test_requests.py` (instead of `$ python setup.py test`). Why? Because using this method outputs many lines of noise before running the suite, and creates/requires a `requests.egg-info` directory to be present in my development environment, which I do not need nor want. \r\n- Removed references to Jython in `setup.py`.\r\n\r\nHope none of that sounded critical! I just wanted to document my perspective behind the decisions. Thanks so much for this patch! The improvements to the test suite are great. \r\n\r\n:sparkles: :cake: :sparkles:"}}