title: Python Unit test: Assertion Error issue
body: <p>I am writing a unit test for the following function:</p>
  
  <pre><code>def _parse_args():
      parser = argparse.ArgumentParser(
          description='Script to configure appliance.'
      )
      parser.add_argument('--config_file',
                          help='Path to a JSON configuration file') 
      print parser.parse_args()
      return parser.parse_args()
  </code></pre>
  
  <p>When I run the function when no config file is given then (verified using the print statement in the function above):
  <code>parser.parse_args()=Namespace(config_file=None)</code></p>
  
  <p>In my unit test I run the function with no config file given and include an assertEquals:</p>
  
  <pre><code>self.assertEquals(my_script._parse_args(), 'Namespace(config_file=None)')
  </code></pre>
  
  <p>But this produces the AssertionError:</p>
  
  <pre><code>AssertionError: Namespace(config_file=None) != 'Namespace(config_file=None)'
  </code></pre>
  
  <p>If I change the unit test to without the quotation marks:</p>
  
  <pre><code>self.assertEquals(my_script._parse_args(), Namespace(config_file=None))
  </code></pre>
  
  <p>I get a NameError:</p>
  
  <pre><code>NameError: global name 'Namespace' is not defined
  </code></pre>
  
  <p>Clearly using quotations is not the correct way to do this but how do I get it to assert that <code>Namespace(config_file=None)</code> is occurring?</p>