I'm trying to run a test and I keep getting ModuleNotFoundError: No module named 'utils'
I am running the command from within the utils\tests folder and this is the line:
python -m unittest test_helpers
This is the structure of my folders:
Project/
|-- src/
| |-- utils/
| | |-- __init__.py
| | |-- helpers.py
| | |-- tests/
| | | |-- __init__.py
| | | |-- test_helpers.py
Here is the code:
import unittest
from utils.helpers import validate_folder_exists
class HelpersTest(unittest.TestCase):
def test_folder_exists(self):
self.assertTrue(
validate_folder_exists('test_folder'))
I've looked at similar solutions over here and haven't found anything that works so far.