nose-devs/nose — Issue #89: attrib plugin doesn't correctly handle case in list attributes
Author: jpellerin
Created: 2011-12-14 15:58:53+00:00
State: closed

What steps will reproduce the problem?
--------------------------------------

1. Run the attached test using

$ nosetests nose_attrib_test_case.py -a tags=Alpha

Nose will run 1 test case (the first)

2. Run the attached test using

$ nosetests nose_attrib_test_case.py -a tags=alpha

Nose will run both test cases.

What is the expected output? What do you see instead?
-----------------------------------------------------

I would expect either:
- The attrib plugin performs a case-insensitive lookup (so that either step
above would run both tests), or
- The attrib plugin performs an exact case-sensitive lookup (so that the
first step runs both tests, the second runs neither)

Instead, if the attribute on the test case is a list, you can only match it
if you give the lower-cased version of the attribute value.

What version of the product are you using? On what operating system?
--------------------------------------------------------------------

- Observed on 0.10.4 (Ubuntu Hardy), but looks like it's still present on
trunk.

Please provide any additional information below.
------------------------------------------------

The attached diff should fix this (though the changed line is now > 80
characters..). It calls lower() on the str'ed value, like in line 185.
This results in a case-insensitive match.

Google Code Info:
Issue #: 228
Author: satoshi....@gmail.com
Created On: 2009-01-13T21:48:47.000Z
Closed On: 2009-04-21T01:57:09.000Z