You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
py3 nosetests fails on 'import upload' in the
data_ingestion script, causing a travis build breakage.
Two other scripts use 'import upload'
- flickrripper
- imagetransfer
And other use 'import <script>' syntax, which will
also fail on py3 nosetests when we have tests for
them.
This change only updates data_ingestion to use
the 'from scripts import upload' import style, to fix
the build breakage while waiting on feedback from nosetests
nose-devs/nose#839
Also update data_ingestion tests to use the new test metaclass.
Change-Id: If40087657718749dd54a37834d551f97424b4914
File "/home/jayvdb/tmp/nosetest-import-issue/a/bar.py", line 1, in <module>
import bar
ImportError: No module named 'bar'
Which shows us that a/bar.py contains import bar instead of import foo. So that's one problem. But assuming it really should be import foo, the other issue is that Python 3.4 does not do relative imports by default. So the import foo in a/bar.py won't work correctly. If you want to keep the relative feel of it, you need to write it as from . import foo, or write it out absolutely as import a.foo.
With the following files:
_ _ init _ _ .py can include _ _ name _ _ ; same result
For the real scenario encountered, see https://gerrit.wikimedia.org/r/#/c/159410/
The text was updated successfully, but these errors were encountered: