-
Notifications
You must be signed in to change notification settings - Fork 924
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixing Python 2.6 unit testing and fixing Google tests. #648
Conversation
+1 - looks like you covered everything I found and then some. |
Btw, this should fix https://issues.apache.org/jira/browse/LIBCLOUD-776 - I forget the exact syntax you put in the commit message to have it automatically close the ticket, but I believe there's a way to do that. |
👍 looks much cleaner |
Sorry, still working on it. I have been able to repro it on python2.6. Still fixing atm. |
It appears that unittest in python 2.6 does not have setUpClass... |
Interesting... libcloud/testing/init.py:27 shows that they try to mitigate that problem with python 2.6's unittest module by importing unittest2 (which is 2.7's module). But that seems to not be working. @Kami comment? |
Could be setup.py:21. It looks like the TestRunner is getting imported from Python 2.6's unittest module, which would explain why setUpClass isn't being called. |
@Kami please take a look at my change to setup.py. |
…est runner instead of a 2.7 test runner. Using a conditional import in setup.py, tests are now run with the standard 2.7 unittest library (known as unittest2 to Python 2.6). Modified/cleaned up Google tests. Tests were not hermetic, but now proper mocking has been put in place to make them hermetic. Tests: python2.7 setup.py test python2.6 setup.py test
@crunk1 setup.py change looks good to me - good catch! |
👍 LGTM too, thanks @crunk1 and @jimbobhickville I ran through tests on both Mac and my GCE debian instance and it all checks out. Merging it in now. |
@erjohnso
@jimbobhickville