quermit/pymox — pull request #3 by dejw (2012-04-24 21:41:33+00:00)
Title: Full Python 3 compatibility

Finally done ;-)

Mox semantics has slightly changed in Python 3:

```python
class Klass:
def UnboundMethod(self, param):
print(param)

method = mox.MockMethod('Name', [], False, Klass.UnboundMethod)
method(1) # (1)
```
Code above will throw `AttributeError` from line (1), because there is no unbound methods any more.

Valid code should look like this:
```python
some_instance = Klass()
method = mox.MockMethod('Name', [], False, Klass.UnboundMethod)
method(some_instance, 1)
```
or
```python
some_instance = Klass()
method = mox.MockMethod('Name', [], False, Klass.UnboundMethod, class_to_bind=Klass)
method(1)
```