Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news-1.dfn.de!news.dfn.de!news.informatik.hu-berlin.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Martin =?UTF-8?Q?Sch=C3=B6=C3=B6n?= Newsgroups: comp.lang.python Subject: Unittest fails to import module Date: 29 Jun 2013 19:13:47 GMT Organization: @ Home Lines: 37 Message-ID: X-Trace: individual.net yWSwwP4jpfP8c24REM3IaAQdG7O+Lf7FvD8oyMaKOm6W7nweWk Cancel-Lock: sha1:aXvwt8wZ8DV7Pp1zMYfK6lRW91g= User-Agent: slrn/pre1.0.0-18 (Linux) Xref: csiph.com comp.lang.python:49449 I know the answer to this must be trivial but I am stuck... I am starting on a not too complex Python project. Right now the project file structure contains three subdirectories and two files with Python code: code blablabla.py test blablabla_test.py doc (empty for now) blablabla_test.py contains "import unittest" and "import blablabla" $PYTHONPATH points at both the code and the test directories. When I run blablabla_test.py it fails to import blablabla.py I have messed around for oven an hour and get nowhere. I have done unittesting like this with success in the past and I have revisited one of those projects and it still works there. The older project has a slightly flatter structure as it lacks a separate code subdirectory: something.py test something_test.py I have temporarily tried this on the new project but to no avail. Any leads? TIA /Martin