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


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

module import questions and question about pytest and module imports

Started bysam pendleton <samp4040@gmail.com>
First post2014-12-05 23:50 -0500
Last post2014-12-05 23:50 -0500
Articles 1 — 1 participant

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


Contents

  module import questions and question about pytest and module imports sam pendleton <samp4040@gmail.com> - 2014-12-05 23:50 -0500

#82051 — module import questions and question about pytest and module imports

Fromsam pendleton <samp4040@gmail.com>
Date2014-12-05 23:50 -0500
Subjectmodule import questions and question about pytest and module imports
Message-ID<mailman.16663.1417949329.18130.python-list@python.org>
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.

what should it be?

if i open a python repl within tests/, how can i say import hummer.py?

do i need to do anything to make pytest aware of hummer.py?

thanks for the help!

[toc] | [standalone]


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


csiph-web