In short, I downloaded the code for bookmarker (Chap 4 sample code)
from ...book.com/code.html and it runs fine, but the nosetests are not
running. I'm running on my Mac, nosetests worked fine on the folder
that I generated myself, but when I downloaded this one and set it up,
nosetests seem to be not finding any tests! I get:
Ran 0 tests in 0.210s
I thought that nosetests would just automagically find any tests in my
project, but it isn't happening. I looked for some config where they
might be turned off, but can't find anything. Any suggestions?
In long...
So I finished Chapter 4 alright, and added my 2 cents to the . But
starting Chap 5 is impossible using the bookmarker code that you end
up with by following the book and typing in the code (I always do
that, rather than downloading it. I learn more that way). You can
try Chap 5 without downloading the code, but the very first errors (p.
61) don't exist because it comes from test_functional.py, a file never
created by following the text of Chap 4. I found it in the downloaded
code, but my nosetests aren't working. They still work in the folder
I typed in myself, btw.
Thanks for any help.
Paul
ps. fresh TG install two days ago, fresh nose from cheeseshop
yesterday, etc.
If you could send me a tar or zip of the non-working test code that
will help a lot. (Feel free to e-mail me directly if you don't want
your code on-list.)
--Mark
--
Mark Ramm-Christensen
email: mark at compoundthinking dot com
blog: www.compoundthinking.com/blog
I had a problem with the execute permissions being set on py source
files. It seems that nosetests won't run python files that have this
bit set.
Picked up on this issue from this thread:
http://www.nabble.com/nosetest-not-working-on-a-quickstarted-project-(using-tg-1.0b2)-t2907156.html
I downloaded the zip from http://www.turbogearsbook.com/code/bookmarker-v1.zip
and let the Finder on my Mac unzip it.
I ran into the same problem as Paul and 'solved' it with: chmod uog-x
*.py in the .../bookmarker-V1/bookmarker/bookmarker/tests directory
I say solved because the tests are still failing but at least they are
running now...Oh and my nosetests is version 0.9.2, from darwinports.
Ah... so the two tests that are still failing are because the patterns
in the test don't match the text in the templates, specifically upper
vs lowercase.
line #15 in test_functional.py:
assert '<TITLE>Boomarker</TITLE>' in cherrypy.response.body[0]
should be:
assert '<title>Boomarker</title>' in cherrypy.response.body[0]
fixed, all good.
HTH
On Jun 1, 9:31 pm, "Mark Ramm" <mark.mchristen...@gmail.com> wrote:
> I'll probably be able to take a look at this later this evening (after
> work and other commitments).
>
> If you could send me a tar or zip of the non-working test code that
> will help a lot. (Feel free to e-mail me directly if you don't want
> your code on-list.)
>
> --Mark
>
--Mark