nose framework command line regex pattern matching doesnt work(-e,-m ,-i)

Nosetests' -m argument is used to match directories, filenames, classes, and functions. (See the nose docs explanation of this parameter) In your case, the filename of your test file (test_case_4.py) does not match the -m match expression (_size), so is never opened.

You may notice that if you force nose to open your test file, it will run only the specified test:

nosetests -sv -m='_size' cases/test_case_4.py

In general, when I want to match specific tests or subsets of tests I use the --attrib plugin, which is available in the default nose install. You may also want to try excluding tests that match some pattern.


Try removing '=' when specifying the regexp:

$ nosetests -w cases/ -s -v -m '_size'

or keep '=' and spell out --match:

$ nosetests -w cases/ -s -v --match='_size'