質問

Why do I have to use the --exe argument while I run django-nose tests. If I don't use it, it will skip the tests to run

e.g.

manage.py test myapp

Ran 0 tests in 0.000s

while my tests are in the correct place etc.

Running it in verbosity 3 it shows:

nosetests --verbosity 3 myapp

it shows: (changed the path names, but anyway, nose finds them but skips them!!)

nose.selector: INFO: /path_to_project/path_to_app/myapp/tests.pyc is executable; skipped
nose.selector: INFO: /path_to_project/path_to_app/myapp/tests.py~ is executable; skipped

The only way to run the tests is using the --exe argument

I Am using:

  • Ubuntu (both 10.4 or 11.4 doesn't matter)
  • Python 2.6 and 2.7
  • Django 1.4.3

why is that?

According to the documents you won't need --exe

But after puzzling for a while... and googling and looking here, i got this suggestion.

see Nose doesn't find Django tests

and Nose unable to find tests in ubuntu

But nowhere the explanation of this workaround for what seems to be a bug?

Or Am I missing something?

I requestion this, because the other questions are quite old, and no satisfactory answer to this problem found.....

役に立ちましたか?

解決

It's not a bug - it's a feature.

Please, see good explanations here: What does "import safe" mean in Python?

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top