Import Path Issue in test_preprocessing.py
#18
prakash2903
started this conversation in
PR Queries
Replies: 1 comment
-
|
@HariharanJB consider looking into this |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
@codit04
I'm facing an issue with import paths in
tests/Preprocessing/test_preprocessing.pywhile trying to run unit tests in GitHub Actions.Local Setup:
To make the imports work locally, I modified the top of the test file to add
src/tosys.path:import sys, os sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "../../src")))Then I used:
from Preprocessing.app import handle_missing_valuesThis works fine on my machine. But Github Action Fails
In the CI environment, I get:
ModuleNotFoundError: No module named 'Preprocessing'I also tried using:
from src.Preprocessing.app import ...But that causes:
ModuleNotFoundError: No module named 'src.Preprocessing'--> PR
Beta Was this translation helpful? Give feedback.
All reactions