-
Notifications
You must be signed in to change notification settings - Fork 670
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
relative imports and nosetests #189
Comments
I'd like to have a consistent policy on how to run the tests. |
This is a tricky one. It is also worth noting that the wiki indicates that one can invoke all the tests from the command line at the path Perhaps that was written before the tests were placed in a separate package? In any case, it seems that the direct command line invocation of There are various blog posts and stackoverflow threads about the original issue discussed in this thread. They are mostly focused on invoking python with the |
Hi Tyler, On 14 Jun, 2015, at 01:36, Tyler Reddy wrote:
Just update the wiki to reflect what currently works. If you (or anyone else) feels the other way should work, raise an issue. Thanks, |
So the way Travis runs tests is just running |
…rts in unit testing modules (Issue #189) -manually repaired unit testing modules caught by above unit testing of import statements
Relative imports are now banned in all MDAnalysis unit testing modules, and have been replaced accordingly. A new testing module will cause the unit testing suite to issue a FAIL if any module contains a line of code with 'from .' and 'import' strings. By substituting the absolute import statements in place of the relative import statements individual tests can now be performed using either of the call signatures originally described in this issue without problems. Absolute imports are also arguably more clear / explicit. So, I'm closing this issue. Yes, you may run |
We prohibit relative imports in the tests (see MDAnalysis#189). When adding tests for the dynamic author list (MDAnalysis#787), I introduced some such relative imports.
Original issue reported on code.google.com by
tyler.je.reddy@gmail.com
on 8 Jul 2014 at 7:39The text was updated successfully, but these errors were encountered: