Error when importing constants file into test file

Warning: beginner!
I have a directory structure thus:

 - common
 - data
 - resources
 - tests
 - view

I run my test from the myapp directory using:

pytest tests/

In the test file try to import ViewConstants. I have tried:

from view import ViewConstants

but when trying to run the test I get:

E   ModuleNotFoundError: No module named 'view'

How do I overcome this import problem?
Thank you!

Use python -m pytest instead of just pytest.

Reference: How to invoke pytest — pytest documentation

Great … thank you