title: Pytest isinstance of a type
body: <p>I'm pretty new to Python and I'm setting up a little game and I want to test it.
  Currently, I'm generating an array of objects (Rock, Paper, Scissors) and each of them inherit from a Roll object:</p>
  
  <pre><code>def build_the_three_rolls():
    return [Rock(), Paper(), Scissors()]
  </code></pre>
  
  <p>This is my test with py.test:</p>
  
  <pre><code>def test_building_rolls():
    assert len(build_the_three_rolls()) == 3
    assert isinstance(build_the_three_rolls()[0], Rock)
    assert isinstance(build_the_three_rolls()[1], Paper)
    assert isinstance(build_the_three_rolls()[2], Scissors)
  </code></pre>
  
  <p>but when I run it, I'm getting the following error:</p>
  
  <pre><code>&gt;       assert isinstance(build_the_three_rolls()[1], Paper)
  E       assert False
  E        +  where False = isinstance(&lt;roll.Paper object at 0x110ab42e8&gt;, Paper)
  </code></pre>
  
  <p>I don't understand why it fails</p>
  
  <p>Thanks!</p>
  
  <p>UPDATE:</p>
  
  <p>Here's the definition of Roll and its child classes:</p>
  
  <pre><code>class Roll:
  def __init__(self, name, defeated_by_self, defeat_self):
      self.name = name
      self.defeated_by_self = defeated_by_self
      self.defeat_self = defeat_self
  
  
  class Rock(Roll):
      def __init__(self):
          defeated_by_self = {}
          defeated_by_self["Scissors"] = "Scissors"
          defeat_self = {}
          defeat_self["Paper"] = "Paper"
          super().__init__("Rock", defeated_by_self, defeat_self)
  
  
  class Paper(Roll):
      def __init__(self):
          defeated_by_self = {}
          defeated_by_self["Rock"] = "Rock"
          defeat_self = {}
          defeat_self["Scissors"] = "Scissors"
          super().__init__("Paper", defeated_by_self, defeat_self)
  
  
  class Scissors(Roll):
      def __init__(self):
          defeated_by_self = {}
          defeated_by_self["Paper"] = "Paper"
          defeat_self = {}
          defeat_self["Rock"] = "Rock"
          super().__init__("Scissors", defeated_by_self, defeat_self)
  </code></pre>