From: Andrew Z <ah...@gm...> - 2013-02-03 02:44:53
|
I read http://www.sqlobject.org/DeveloperGuide.html#testing and am still unclear on exactly how to run a test. Sorry, this may be a basic question, but I hope the Developer Guide could be more explicit. After installing py.test, I basically did this: $ svn co http://svn.colorstudy.com/SQLObject/trunk SQLObject $ cd SQLObject $ python sqlobject/tests/test_unicode.py -D sqlite:///tmp/foo.db However: Traceback (most recent call last): File "sqlobject/tests/test_unicode.py", line 1, in <module> from sqlobject import * ImportError: No module named sqlobject I also tried something like and got basically the same error $ pytest sqlobject/tests/test_unicode.py -D sqlite:///tmp/foo.db Andrew |
From: Oleg B. <ph...@ph...> - 2013-02-03 10:07:19
|
Hello! On Sat, Feb 02, 2013 at 07:44:23PM -0700, Andrew Z <ah...@gm...> wrote: > I read http://www.sqlobject.org/DeveloperGuide.html#testing and am > still unclear on exactly how to run a test. Sorry, this may be a > basic question, but I hope the Developer Guide could be more explicit. > > After installing py.test, I basically did this: > > $ svn co http://svn.colorstudy.com/SQLObject/trunk SQLObject > $ cd SQLObject > $ python sqlobject/tests/test_unicode.py -D sqlite:///tmp/foo.db > > However: > Traceback (most recent call last): > File "sqlobject/tests/test_unicode.py", line 1, in <module> > from sqlobject import * > ImportError: No module named sqlobject > > I also tried something like and got basically the same error > > $ pytest sqlobject/tests/test_unicode.py -D sqlite:///tmp/foo.db Use py.test: $ py.test sqlobject/tests/test_unicode.py -D sqlite:///tmp/foo.db py.test is a library from py.lib; pytest is from logilab -- a completely different library. During the years I've working on SQLObject I developed a number of shell scripts to run tests and collect reports. If you are intersted I can send them to you. Oleg. -- Oleg Broytman http://phdru.name/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |