Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #82065 > unrolled thread

Re: module import questions and question about pytest and module imports

Started byDave Angel <davea@davea.name>
First post2014-12-07 11:26 -0500
Last post2014-12-07 11:26 -0500
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: module import questions and question about pytest and module imports Dave Angel <davea@davea.name> - 2014-12-07 11:26 -0500

#82065 — Re: module import questions and question about pytest and module imports

FromDave Angel <davea@davea.name>
Date2014-12-07 11:26 -0500
SubjectRe: module import questions and question about pytest and module imports
Message-ID<mailman.16675.1417969603.18130.python-list@python.org>
On 12/05/2014 11:50 PM, sam pendleton wrote:
> garage/
>      |- __init__.py
>      |- cars/
>          |- __init__.py
>          |- hummer.py
> tests/
>      |- test_cars.py
>
> at the top of test_cars.py, there is this:
>      from garage.cars import hummer
>
> pytest is on this import statement, so i guess it's incorrect.

No idea what that statement is trying to say.

>
> what should it be?

If you're going to import something, it either has to be on the 
sys.path, or in the current directory.  Is garage/ on your sys.path?

You can examine sys.path  by
    import sys
    print(sys.path)


-- 
DaveA

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web