Open scarabeusiv opened 5 years ago
Thanks for the detailed issue, and apologies for not replying sooner. Unfortunately I don't think I will have time to work on any of these suggestions in the near future, but I would be happy to review contributions addressing any or all of these issues.
I am trying to update and run tests on openSUSE and following things are bit pita:
unittest2 are slowly phased out also they are only imported on py2.6 based on fxa/tests/utils.py thus there is no reason to import/require it every time (those requires should be limited every time, ie to pull in the unittest2 it should be done like
unittest2;python_version<"2.7"'
Instead of nose executor it is good idea to use working
python setup.py test
or switch to pytest (simple swap from nose should be mostly enough).Grequests should be replaced by py3 compatible requests-threads or requests-futures in
test_monkey_patch_for_gevent
.For the online tests they should be skipped ie if you switch to pytest you can use
@pytest.mark.online
and we can later usepytest -m 'not online'
for following tests:You should not import mock on python3 as there it is regular part of the unittest:
In some parts of the tests you already check for it but here it is hardcoded.