Hello,
I’m having some trouble in ex.52 with some import errors.
First my directory structure:
My import commands in tests and files are these:
planisphere_tests.py:
from nose.tools import *
from gothonweb.planisphere import *
app_tests.py:
from nose.tools import *
from gothonweb.app import *
app.py
from flask import Flask, session, redirect, url_for, escape, request
from flask import render_template
from gothonweb import planisphere
Now, with imports like these i can run tests perfectly with:
nosetests app_tests.py
or
nosetests planisphere_tests.py
from the /tests directory. The problem is i can’t run the app.py file. When I go cd … and then ‘python app.py’ i get import error:
file 'app.py' from gothonweb import planisphere ImportError
I can change the import commands for this to work but then my tests will have an import error. I tried ‘$env:PYTHONPATH = “$env:PYTHONPATH;.”’ but still not working.
I haven’t been able to fix this.
Where is my mistake?
Thank you.