zeekay / decorum

Python decorator helper library.
MIT License
14 stars 2 forks source link

Refs #8 - In README, converted examples into doctests #10

Closed benoitbryon closed 10 years ago

benoitbryon commented 10 years ago

Hi, Here is a first proposal around testing, using nosetests and doctests: I mostly turned examples in README into doctests, then included them in the test suite.

benoitbryon commented 10 years ago

Warning: it looks like I did not understand the "keep_attrs" usage... I could not figure out how it works. So the following doctests are broken:

@zeekay: can you have a look at it and tell me what's wrong with the tests? So that I can fix them.

benoitbryon commented 10 years ago

Refs #8

zeekay commented 10 years ago

Thanks! I merged locally and fixed the tests up. I also changed the name of keep_attrs to assigned which matches the language functools.wraps uses for similar keyword argument.