Nose and django-nose not finding the right tests cases
162 views
Skip to first unread message
Berk Birand
unread,
Aug 8, 2013, 1:04:02 PM8/8/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to nose-...@googlegroups.com
Hi,
I've been trying to fix this issue for several hours now, and I think it would be best if I asked for help. I'm setting up a directory structure for my Django app to separate functional and unit tests.
At the root of the project, I have a folder called "tests" that has this structure:
If I want to run just the unit tests, should I not be able to use: $ nosetests tests.unit
---------------------------------------------------------------------- Ran 0 tests in 0.000s
OK
However, when I run: $ nosetests tests/unit/ E # .. Expected errors because project settings are not initialized ----------------- Ran 1 test in 0.001s
FAILED (errors=1)
What am I missing? I also have a setup function in tests.unit.__init__.py that's not getting called.
Thanks, bB
Andres Riancho
unread,
Aug 8, 2013, 2:38:52 PM8/8/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to nose-users
When in a django project using django-nose, you need to use: python
manage.py test
Not doing so will end up with that Expected errors because project
settings are not initialized message.
--
Andrés Riancho
Project Leader at w3af - http://w3af.org/ Web Application Attack and Audit Framework
Twitter: @w3af
GPG: 0x93C344F3
Berk Birand
unread,
Aug 9, 2013, 1:04:26 AM8/9/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to nose-...@googlegroups.com
Thanks for your reply! Yes, what I meant by "Expected" errors is that I was expecting them due to the absence of loaded settings. My question how to get the nosetest test runner to discover the tests when I run it by calling it as a module. So the example in which I *don't* get the Expected error is the question.