'python unittest discover

I don't understand something, with the python unittest discover. I made this project:

project/
    __init__.py
    src/
        __init__.py
        criteria.py
    tests/
        __init__.py
        criteria_test.py

And to be able to know if I loaded the test correctly I ensure myself to make it fail with the code below

# coding: utf-8
import unittest

class TestCriteria(unittest.TestCase):
    def setUp(self):
        pass
    def test_criteriaFailure(self):
        self.assertTrue(False)

When I do the command in the command-line, I'm at the file project (the root of my packages), I guess everything can be imported.

I tried:

python -m unittest discover
python -m unittest discover -s tests -p '*_test.py'

but it always return me this output:

Ran 0 tests in 0.000s

Ok

I'd like to understand how to use this feature (I'm using python3.2.3) without having to download and install Nose.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source