Module ImportFrom alias ClassDef bases body FunctionDef arguments args NameParam defaults body Assert CompareEq Call NameLoad Str Str Assert CompareEq Call NameLoad Str Str Assert CompareEq Call NameLoad Str Str Assert CompareEq Call NameLoad Str Str Assert CompareEq Call NameLoad Str Str Assert CompareEq Call NameLoad Str Str Assert CompareEq Call NameLoad Str Str Assert CompareEq Call NameLoad Str Str Assert CompareEq Call NameLoad Str Str Assert CompareEq Call NameLoad Str Str Assert CompareEq Call NameLoad Str Str Assert CompareEq Call NameLoad Str Str Assert CompareEq Call NameLoad Str Str Assert CompareEq Call NameLoad Str Str Assert CompareEq Call NameLoad Str Str Assert CompareEq Call NameLoad Str Str Assert CompareEq Call NameLoad Str Str Assert CompareEq Call NameLoad Str Str Assert CompareEq Call NameLoad Str Str Assert CompareEq Call NameLoad Str Str Assert CompareEq Call NameLoad Str Str Assert CompareEq Call NameLoad Str Str Assert CompareEq Call NameLoad Str Str Assert CompareEq Call NameLoad Str Str Assert CompareEq Call NameLoad Str Str Assert CompareEq Call NameLoad Str Str Assert CompareEq Call NameLoad Str Str Assert CompareEq Call NameLoad Str Str Assert CompareEq Call NameLoad Str Str Assert CompareEq Call NameLoad Str Str Assert CompareEq Call NameLoad Str Str Assert CompareEq Call NameLoad Str Str Assert CompareEq Call NameLoad Str Str Assert CompareEq Call NameLoad Str Str Assert CompareEq Call NameLoad Str Str Assert CompareEq Call NameLoad Str Str Assert CompareEq Call NameLoad Str Str Assert CompareEq Call NameLoad Str Str decorator_list decorator_list If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr
N/A py.__.tool.utestconvert rewrite_utest Test_UTestConvert N/A N/A testall N/A N/A self N/A N/A N/A N/A N/A rewrite_utest badger badger badger badger badger badger N/A N/A N/A rewrite_utest self.assertRaises(excClass, callableObj, *args, **kwargs) raises(excClass, callableObj, *args, **kwargs) N/A N/A N/A rewrite_utest 
            self.failUnlessRaises(TypeError, func, 42, **{'arg1': 23})
             
            raises(TypeError, func, 42, **{'arg1': 23})
             N/A N/A N/A rewrite_utest 
            self.assertRaises(TypeError,
                              func,
                              mushroom)
             
            raises(TypeError,
                              func,
                              mushroom)
             N/A N/A N/A rewrite_utest self.fail() raise AssertionError N/A N/A N/A rewrite_utest self.fail('mushroom, mushroom') raise AssertionError, 'mushroom, mushroom' N/A N/A N/A rewrite_utest self.assert_(x) assert x N/A N/A N/A rewrite_utest self.failUnless(func(x)) # XXX assert func(x) # XXX N/A N/A N/A rewrite_utest 
            self.assert_(1 + f(y)
                         + z) # multiline, keep parentheses
             
            assert (1 + f(y)
                         + z) # multiline, keep parentheses
             N/A N/A N/A rewrite_utest self.assert_(0, 'badger badger') assert 0, 'badger badger' N/A N/A N/A rewrite_utest self.assert_(0, '''badger badger''') assert 0, '''badger badger''' N/A N/A N/A rewrite_utest 
            self.assert_(0,
                 'Meet the badger.\n')
             
            assert 0, (
                 'Meet the badger.\n')
             N/A N/A N/A rewrite_utest 
            self.failIf(0 + 0
                          + len('badger\n')
                          + 0, '''badger badger badger badger
                                 mushroom mushroom
                                 Snake!  Ooh a snake!
                              ''') # multiline, must move the parens
             
            assert not (0 + 0
                          + len('badger\n')
                          + 0), '''badger badger badger badger
                                 mushroom mushroom
                                 Snake!  Ooh a snake!
                              ''' # multiline, must move the parens
             N/A N/A N/A rewrite_utest self.assertEquals(0, 0) assert 0 == 0 N/A N/A N/A rewrite_utest 
            self.assertEquals(0,
                 'Run away from the snake.\n')
             
            assert 0 == (
                 'Run away from the snake.\n')
             N/A N/A N/A rewrite_utest 
            self.assertEquals(badger + 0
                              + mushroom
                              + snake, 0)
             
            assert (badger + 0
                              + mushroom
                              + snake) == 0
             N/A N/A N/A rewrite_utest 
            self.assertNotEquals(badger + 0
                              + mushroom
                              + snake,
                              mushroom
                              - badger)
             
            assert (badger + 0
                              + mushroom
                              + snake) != (
                              mushroom
                              - badger)
             N/A N/A N/A rewrite_utest 
            self.assertEquals(badger(),
                              mushroom()
                              + snake(mushroom)
                              - badger())
             
            assert badger() == (
                              mushroom()
                              + snake(mushroom)
                              - badger())
             N/A N/A N/A rewrite_utest self.failIfEqual(0, 0) assert not 0 == 0 N/A N/A N/A rewrite_utest self.failUnlessEqual(0, 0) assert 0 == 0 N/A N/A N/A rewrite_utest 
            self.failUnlessEqual(mushroom()
                                 + mushroom()
                                 + mushroom(), '''badger badger badger
                                 badger badger badger badger
                                 badger badger badger badger
                                 ''') # multiline, must move the parens
             
            assert (mushroom()
                                 + mushroom()
                                 + mushroom()) == '''badger badger badger
                                 badger badger badger badger
                                 badger badger badger badger
                                 ''' # multiline, must move the parens
             N/A N/A N/A rewrite_utest 
            self.assertEquals('''snake snake snake
                                 snake snake snake''', mushroom)
             
            assert '''snake snake snake
                                 snake snake snake''' == mushroom
             N/A N/A N/A rewrite_utest 
            self.assertEquals(badger(),
                              snake(), 'BAD BADGER')
             
            assert badger() == (
                              snake()), 'BAD BADGER'
             N/A N/A N/A rewrite_utest 
            self.assertNotEquals(badger(),
                              snake()+
                              snake(), 'POISONOUS MUSHROOM!                              Ai! I ate a POISONOUS MUSHROOM!!')
             
            assert badger() != (
                              snake()+
                              snake()), 'POISONOUS MUSHROOM!                              Ai! I ate a POISONOUS MUSHROOM!!'
             N/A N/A N/A rewrite_utest 
            self.assertEquals(badger(),
                              snake(), '''BAD BADGER
                              BAD BADGER
                              BAD BADGER'''
                              )
             
            assert badger() == (
                              snake()), ( '''BAD BADGER
                              BAD BADGER
                              BAD BADGER'''
                              )
             N/A N/A N/A rewrite_utest 
            self.assertEquals('''BAD BADGER
                              BAD BADGER
                              BAD BADGER''', '''BAD BADGER
                              BAD BADGER
                              BAD BADGER''')
             
            assert '''BAD BADGER
                              BAD BADGER
                              BAD BADGER''' == '''BAD BADGER
                              BAD BADGER
                              BAD BADGER'''
             N/A N/A N/A rewrite_utest 
            self.assertEquals('''GOOD MUSHROOM
                              GOOD MUSHROOM
                              GOOD MUSHROOM''',
                              '''GOOD MUSHROOM
                              GOOD MUSHROOM
                              GOOD MUSHROOM''',
                              ''' FAILURE
                              FAILURE
                              FAILURE''')
             
            assert '''GOOD MUSHROOM
                              GOOD MUSHROOM
                              GOOD MUSHROOM''' == (
                              '''GOOD MUSHROOM
                              GOOD MUSHROOM
                              GOOD MUSHROOM'''), (
                              ''' FAILURE
                              FAILURE
                              FAILURE''')
             N/A N/A N/A rewrite_utest 
            self.assertAlmostEquals(first, second, 5, 'A Snake!')
             
            assert round(first - second, 5) == 0, 'A Snake!'
             N/A N/A N/A rewrite_utest 
            self.assertAlmostEquals(first, second, 120)
             
            assert round(first - second, 120) == 0
             N/A N/A N/A rewrite_utest 
            self.assertAlmostEquals(first, second)
             
            assert round(first - second, 7) == 0
             N/A N/A N/A rewrite_utest 
            self.assertAlmostEqual(first, second, 5, '''A Snake!
            Ohh A Snake!  A Snake!!
            ''')
             
            assert round(first - second, 5) == 0, '''A Snake!
            Ohh A Snake!  A Snake!!
            '''
             N/A N/A N/A rewrite_utest 
            self.assertNotAlmostEqual(first, second, 5, 'A Snake!')
             
            assert round(first - second, 5) != 0, 'A Snake!'
             N/A N/A N/A rewrite_utest 
            self.failIfAlmostEqual(first, second, 5, 'A Snake!')
             
            assert not round(first - second, 5) == 0, 'A Snake!'
             N/A N/A N/A rewrite_utest 
            self.failIfAlmostEqual(first, second, 5, 6, 7, 'Too Many Args')
             
            self.failIfAlmostEqual(first, second, 5, 6, 7, 'Too Many Args')
             N/A N/A N/A rewrite_utest 
            self.failUnlessAlmostEquals(first, second, 5, 'A Snake!')
             
            assert round(first - second, 5) == 0, 'A Snake!'
             N/A N/A N/A rewrite_utest 
              self.assertAlmostEquals(now do something reasonable ..()
            oops, I am inside a comment as a ''' string, and the fname was
            mentioned in passing, leaving us with something that isn't an
            expression ... will this blow up?
             
              self.assertAlmostEquals(now do something reasonable ..()
            oops, I am inside a comment as a ''' string, and the fname was
            mentioned in passing, leaving us with something that isn't an
            expression ... will this blow up?
             N/A N/A N/A rewrite_utest 
        self.failUnless('__builtin__' in modules, "An entry for __builtin__ "
                                                    "is not in sys.modules.")
             
        assert '__builtin__' in modules, ( "An entry for __builtin__ "
                                                    "is not in sys.modules.")
             N/A N/A N/A rewrite_utest 
            self.assertEquals(0, 0); self.assertEquals(1, 1) #not 2 per line!
             
            assert 0 == 0; self.assertEquals(1, 1) #not 2 per line!
             N/A N/A N/A N/A __name__ __main__ N/A N/A N/A N/A unittest main