mkwiatkowski/pinocchio — pull request #20 by little-dude (2014-11-23 22:03:47+00:00)
Title: Allows attributes with values

We can now give values to the attributes with the following syntax :
`mymodule.MyTestClass.my_test_method: attr=attr_value`

I also updated the example.

```
# examples/test_decorator.attribs
test_decorator.TestMeWithValues: runlevel=default
test_decorator.TestMeWithValues.test_me_runlevel_quick: runlevel=quick
test_decorator.TestMeWithValues.test_me_runlevel_express: runlevel=express
test_decorator.TestMeWithValues.test_me_runlevel_extensive: runlevel=extensive
```

```python
# examples/test_decorator.py
class TestMeWithValues:
def test_me_runlevel_default(self):
print "Running test_me_runlevel_default"

def test_me_runlevel_quick(self):
print "Running test_me_runlevel_quick"

def test_me_runlevel_express(self):
print "Running test_me_runlevel_express"

def test_me_runlevel_extensive(self):
print "Running test_me_runlevel_extensive"
```

Output :

```
(env2)./~pinocchio git:namedattr ❯❯❯ nosetests --decorator-file examples/test_decorator.attribs examples/test_decorator.py -a runlevel=default -s
Running test_me_runlevel_default
.
----------------------------------------------------------------------
Ran 1 test in 0.000s

OK
(env2)./~pinocchio git:namedattr ❯❯❯ nosetests --decorator-file examples/test_decorator.attribs examples/test_decorator.py -a runlevel=quick -s
Running test_me_runlevel_quick
.
----------------------------------------------------------------------
Ran 1 test in 0.000s

OK
(env2)./~pinocchio git:namedattr ❯❯❯ nosetests --decorator-file examples/test_decorator.attribs examples/test_decorator.py -a runlevel=express -s
Running test_me_runlevel_express
.
----------------------------------------------------------------------
Ran 1 test in 0.000s

OK
(env2)./~pinocchio git:namedattr ❯❯❯ nosetests --decorator-file examples/test_decorator.attribs examples/test_decorator.py -a runlevel=extensive -s
Running test_me_runlevel_extensive
.
----------------------------------------------------------------------
Ran 1 test in 0.000s

OK
```