aboutsummaryrefslogtreecommitdiffstats
path: root/tests/samplebinding/duck_punching_test.py
Commit message (Collapse)AuthorAgeFilesLines
* chmod -x on all tests.Hugo Parente Lima2010-06-161-0/+0
| | | | We can't run they standalone anyway, because they need some env vars to be exported like PYTHONPATH.
* Adds support for Duck Punching (aka Monkey Patching).Marcelo Lira2010-01-211-0/+139
The simplest definition of duck punching for our purposes is the ability to change the definition of a method in an instance of a class. To allow this behaviour the SbkBaseWrapper structure had to be extended with a 'ob_dict' which is a PyObject pointer to the instance dictionary. It is originally set to NULL until the user tries to access it. This dictionary could be accessed through the '__dict__' instance property. For now it is read-only. The generator was updated to handle the instance dictionary, and an extensive duck punching test was also added. Reviewed by Hugo Parente Lima <hugo.lima@openbossa.org>