title: Testing that the proper object is returned in nose (Learn Python the Hard Way Ex 49)
body: <p>I have been working on Learn Python the Hard Way 2nd Ed and it has been fantastic.  My question has to do with Exercise 49 (http://learnpythonthehardway.org/book/ex49.html), which is about writing nose unit tests that covers code given in the book.  I attempting to write a test that covers this function: </p>
  
  <pre><code>def parse_subject(word_list, subj):
      verb = parse_verb(word_list)
      obj = parse_object(word_list)
      return Sentence(subj, verb, obj)
  </code></pre>
  
  <p>I tried to run this test:</p>
  
  <pre><code>from nose.tools import *
  from ex48 import engine
  def test_parse_subject():
    word_list = [('verb', 'verb'),
                 ('direction', 'direction')]
    test_subj = ('noun', 'noun')
    test_verb = ('verb', 'verb')
    test_obj = ('direction', 'direction')
    assert_equal(engine.parse_subject(word_list, ('noun', 'noun')), 
                 engine.Sentence(test_subj, test_verb, test_obj))
  </code></pre>
  
  <p>But it returns with an error, as the two Sentence objects are not the <strong>EXACT</strong> same object:</p>
  
  <pre><code>⚡ nosetests                
  .....F..........
  ======================================================================
  FAIL: tests.engine_tests.test_parse_subject
  ----------------------------------------------------------------------
  Traceback (most recent call last):
   File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/nose/case.py", line 187, in runTest
      self.test(*self.arg)
   File "/Users/gregburek/code/LPTHW/projects/ex48/tests/engine_tests.py", line 59, in test_parse_subject
      engine.Sentence(test_subj, test_verb, test_obj))
  AssertionError: &lt;ex48.engine.Sentence object at 0x101471390&gt; != &lt;ex48.engine.Sentence object at 0x1014713d0&gt;
  
  ----------------------------------------------------------------------
  Ran 16 tests in 0.018s
  
  FAILED (failures=1)
  </code></pre>
  
  <p>How may I use nose to check that the two objects should be the same?</p>