strange permission issue with nosetests

M

Mr.SpOOn

Hi,
I'm trying the nose testing package. I've just started reading the
tutorial and I had a problem with the first simple example.

This is the test:

def test_b():
assert 'b' == 'b'

In the same directory I gave the command nosetests and it runs the test.

Then I try with nosetests -v, but it just says this:

----------------------------------------------------------------------
Ran 0 tests in 0.003s

OK

I thought because I didn't change anything in the file, don't know.
Tried to change, but nothing. I moved on and wrote another test,
inside a class, but nothing. It just doesn't run tests.

Searching on google I found this: http://www.siafoo.net/article/61
He had the same issue and said to change permission of the file to 664.

I tried and it worked.
Is that normal? Why does it happen?
 
M

Mr.SpOOn

Unit test modules, which are primarily meant to be imported and have
the tests collected and *then* run by the unit test framework, should
be non-executable modules. I'm very glad nose enforces this.

Mmm it seems strange to me. I mean, there isn't any reference to this
on the site. How would one imagine he needs to change permission? And
it is strange that the first time I didn't need to change anything.
 
R

Roel Schroeven

Mr.SpOOn schreef:
Mmm it seems strange to me. I mean, there isn't any reference to this
on the site. How would one imagine he needs to change permission? And
it is strange that the first time I didn't need to change anything.

You can also nosetests --exe; with that option, nose will also include
executable files (see the section "nosetests usage" on the website
(http://somethingaboutorange.com/mrl/projects/nose/#usage, under
"Options")).

It took me a while too before I could figure what was wrong, and how to
solve it.

--
The saddest aspect of life right now is that science gathers knowledge
faster than society gathers wisdom.
-- Isaac Asimov

Roel Schroeven
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,131
Latest member
IsiahLiebe
Top