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

2014-12-08 Thread Ian Kelly
On Sun, Dec 7, 2014 at 9:50 AM, sam pendleton wrote: > Having to put the garage package on the sys.path seems a little off, > why wouldn't relative imports work? Relative imports are relative to a package's hierarchy of namespaces, not relative to the file system. As such, you can't perform a rel

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

2014-12-08 Thread Jean-Michel Pichavant
- Original Message - > From: "sam pendleton" > Having to put the garage package on the sys.path seems a little off, > why wouldn't relative imports work? > > Do most people somehow put their packages in sys.path when bundling > their python packages up to be shared with setuptools or othe

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

2014-12-08 Thread Dave Angel
On 12/07/2014 11:50 AM, sam pendleton wrote: Thanks for getting back with me! On Sun, Dec 7, 2014 at 11:26 AM, Dave Angel wrote: On 12/05/2014 11:50 PM, sam pendleton wrote: garage/ |- __init__.py |- cars/ |- __init__.py |- hummer.py tests/ |- test_cars.

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

2014-12-08 Thread sam pendleton
Thanks for getting back with me! On Sun, Dec 7, 2014 at 11:26 AM, Dave Angel wrote: > 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_c

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

2014-12-07 Thread Dave Angel
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 inc