@@ -45,7 +45,7 @@ the correct arguments.
4545This example tests that calling `ProductionClass().method ` results in a call to
4646the `something ` method:
4747
48- >>> class ProductionClass ( object ) :
48+ >>> class ProductionClass :
4949 ... def method (self ):
5050 ... self .something(1 , 2 , 3 )
5151 ... def something (self , a , b , c ):
@@ -69,7 +69,7 @@ in the correct way.
6969The simple `ProductionClass ` below has a `closer ` method. If it is called with
7070an object then it calls `close ` on it.
7171
72- >>> class ProductionClass ( object ) :
72+ >>> class ProductionClass :
7373 ... def closer (self , something ):
7474 ... something.close()
7575 ...
@@ -398,7 +398,7 @@ ends:
398398Where you use `patch ` to create a mock for you, you can get a reference to the
399399mock using the "as" form of the with statement:
400400
401- >>> class ProductionClass ( object ) :
401+ >>> class ProductionClass :
402402 ... def method (self ):
403403 ... pass
404404 ...
@@ -446,7 +446,7 @@ testable way in the first place...
446446
447447So, suppose we have some code that looks a little bit like this:
448448
449- >>> class Something ( object ) :
449+ >>> class Something :
450450 ... def __init__ (self ):
451451 ... self .backend = BackendProvider()
452452 ... def method (self ):
@@ -554,7 +554,7 @@ mock this using a `MagicMock`.
554554
555555Here's an example class with an "iter" method implemented as a generator:
556556
557- >>> class Foo ( object ) :
557+ >>> class Foo :
558558 ... def iter (self ):
559559 ... for i in [1 , 2 , 3 ]:
560560 ... yield i
@@ -664,7 +664,7 @@ function will be turned into a bound method if it is fetched from an instance.
664664It will have `self ` passed in as the first argument, which is exactly what I
665665wanted:
666666
667- >>> class Foo ( object ) :
667+ >>> class Foo :
668668 ... def foo (self ):
669669 ... pass
670670 ...
@@ -1183,7 +1183,7 @@ for us.
11831183You can see in this example how a 'standard' call to `assert_called_with ` isn't
11841184sufficient:
11851185
1186- >>> class Foo ( object ) :
1186+ >>> class Foo :
11871187 ... def __init__ (self , a , b ):
11881188 ... self .a, self .b = a, b
11891189 ...
@@ -1210,7 +1210,7 @@ A comparison function for our `Foo` class might look something like this:
12101210And a matcher object that can use comparison functions like this for its
12111211equality operation would look something like this:
12121212
1213- >>> class Matcher ( object ) :
1213+ >>> class Matcher :
12141214 ... def __init__ (self , compare , some_obj ):
12151215 ... self .compare = compare
12161216 ... self .some_obj = some_obj
0 commit comments