google-code-export / pymox

Automatically exported from code.google.com/p/pymox
0 stars 0 forks source link

Signature matching of unbound methods doesn't work for subclasses #27

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

Given module foo:
class Bar:
  def Qux(self):
    pass

# test
StubOut(foo.Bar, "Qux")
foo.Bar.Qux(IsA(BarSubclass))

# error, since when doing signature inspection, Bar is not an instance of 
BarSubclass.

Using an instance of Bar works just fine, as does IgnoreArg()

The signature matching code needs to be smarter, more specifically when IsA 
comparator is used.

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

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

Head.

Please provide any additional information below.

Original issue reported on code.google.com by stev...@google.com on 18 Aug 2010 at 9:13

GoogleCodeExporter commented 9 years ago
Fixed at revision 55

Original comment by steve.mi...@gmail.com on 18 Aug 2010 at 9:19