  from nose.tools import assert_equal
  
  class UnitTest (object):
      def testReverseWords(self, func):
              assert_equal(func('the sun is hot'), 'eht nus si toh')
              assert_equal(func(''), None)
              assert_equal(func('123 456 789'), '321 654 987')
              assert_equal(func('magic'), 'cigam')
              print('Success: reverse_words')
              
  def main():
      test = UnitTest()
      test.testReverseWords(reverse_words)
 
</s> remove class UnitTest (object):
 </s> add  </s> remove from nose.tools import assert_equal
 </s> add import unittest


class TestReverseWords(unittest.TestCase): </s> remove     "            assert_equal(func('the sun is hot'), 'eht nus si toh')\n",
    "            assert_equal(func(''), None)\n",
    "            assert_equal(func('123 456 789'), '321 654 987')\n",
    "            assert_equal(func('magic'), 'cigam')\n",
 </s> add     "            self.assertEqual(func('the sun is hot'), 'eht nus si toh')\n",
    "            self.assertEqual(func(''), None)\n",
    "            self.assertEqual(func('123 456 789'), '321 654 987')\n",
    "            self.assertEqual(func('magic'), 'cigam')\n", </s> remove     "            assert_equal(func('the sun is hot'), 'eht nus si toh')\n",
    "            assert_equal(func(''), None)\n",
    "            assert_equal(func('123 456 789'), '321 654 987')\n",
    "            assert_equal(func('magic'), 'cigam')\n",
 </s> add     "            self.assertEqual(func('the sun is hot'), 'eht nus si toh')\n",
    "            self.assertEqual(func(''), None)\n",
    "            self.assertEqual(func('123 456 789'), '321 654 987')\n",
    "            self.assertEqual(func('magic'), 'cigam')\n", </s> remove     "class UnitTest (object):\n",
 </s> add 
            self.assertEqual(func('the sun is hot'), 'eht nus si toh')
            self.assertEqual(func(''), None)
            self.assertEqual(func('123 456 789'), '321 654 987')
            self.assertEqual(func('magic'), 'cigam')
  from nose.tools import assert_equal
  
  class UnitTest (object):
      def testReverseWords(self, func):
            self.assertEqual(func('the sun is hot'), 'eht nus si toh')
            self.assertEqual(func(''), None)
            self.assertEqual(func('123 456 789'), '321 654 987')
            self.assertEqual(func('magic'), 'cigam')
            self.assertEqual(func('the sun is hot'), 'eht nus si toh')
            self.assertEqual(func(''), None)
            self.assertEqual(func('123 456 789'), '321 654 987')
            self.assertEqual(func('magic'), 'cigam')
            self.assertEqual(func('the sun is hot'), 'eht nus si toh')
            self.assertEqual(func(''), None)
            self.assertEqual(func('123 456 789'), '321 654 987')
            self.assertEqual(func('magic'), 'cigam')
            self.assertEqual(func('the sun is hot'), 'eht nus si toh')
            self.assertEqual(func(''), None)
            self.assertEqual(func('123 456 789'), '321 654 987')
            self.assertEqual(func('magic'), 'cigam')
              print('Success: reverse_words')
              
  def main():
      test = UnitTest()
      test.testReverseWords(reverse_words)
keep keep keep keep replace replace replace replace keep keep keep keep keep
 #273: Remove nose dependency for staging/ (#283) 
staging/arrays_strings/reverse_words/reverse_words_solution.py