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


Groups > comp.lang.python > #82051

module import questions and question about pytest and module imports

Date 2014-12-05 23:50 -0500
Subject module import questions and question about pytest and module imports
From sam pendleton <samp4040@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.16663.1417949329.18130.python-list@python.org> (permalink)

Show all headers | View raw


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!

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

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

csiph-web