lundi 1 juin 2015

How to disable adding relative path in PyCharm?

I want to execute tests but I can not since PyCharm is adding relative path of file executed.

I have such directory structure:

src
src/wage.py
src/test/__init__.py
src/test/wage.py

When I put src/test/wage.py it imports src/test/wage.py instead src/wage.py since sys.path is ['src/test', 'src'] not ['src'].

How to disable adding src/test at all or at first place in PyCharm - since it impossible to import correct wage.py?

Aucun commentaire:

Enregistrer un commentaire