As suggested in the pytest documentation, I have set up my package with the intent not not distributing my tests along with my package:
setup.py
myp
The problem is just that python can't find your appmodule when you ask for it to look in the mypkg directory where it doesn't exist.
You've set the directories up correctly with:
setup.py
mypkg/
__init__.py
mypkg/
appmodule.py
tests/
test_app.py
...
But since you've created another mypkg/ subdirectory to house your appmodule.py, you'll need to place __init__.py in that subdirectory for an import to work. The call would also be changed to:
from mypkg.mypkg.appmodule import *
Hope this helps.