Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #49449
| 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 Schöön <martin.schoon@gmail.com> |
| Newsgroups | comp.lang.python |
| Subject | Unittest fails to import module |
| Date | 29 Jun 2013 19:13:47 GMT |
| Organization | @ Home |
| Lines | 37 |
| Message-ID | <b38pvbFjlv9U1@mid.individual.net> (permalink) |
| 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 |
Show key headers only | View raw
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
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Unittest fails to import module Martin Schöön <martin.schoon@gmail.com> - 2013-06-29 19:13 +0000
Re: Unittest fails to import module Roy Smith <roy@panix.com> - 2013-06-29 15:25 -0400
Re: Unittest fails to import module Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-29 19:26 +0000
Re: Unittest fails to import module Martin Schöön <martin.schoon@gmail.com> - 2013-06-29 21:19 +0000
csiph-web