nose-devs / nose

nose is nicer testing for python
http://readthedocs.org/docs/nose/en/latest/
1.36k stars 396 forks source link

wantFile plugin method works only with directory as path parameter #1016

Closed ykvch closed 8 years ago

ykvch commented 8 years ago

Steps:

  1. Create plugin with wantFile method and tests inside files matching test*.py pattern
  2. Call nose runner with that plugin and test*.py as parameter

Actual:

  1. Tests are run. Plugin method wantFile is not called

Expected:

  1. wantFile called for every file matching test*.py

Note: wantFile works if path parameter is a directory

jszakmeister commented 8 years ago

Two things: 1) I'm not sure this is a bug. If you explicitly name a file, it seems reasonable to test it. 2) Nose is unmaintained these days. You'd do better to look at Nose2.

ykvch commented 8 years ago

1) I'm not sure this is a bug. If you explicitly name a file, it seems reasonable to test it

Yeah, thought about this too (and then actually saw that in the code). While it was a little surprising to see plugin "not working" (at a first glance) while trying to run a subset of my tests from directory by a wildcard. Thanks.