def testDottedCall(self): single, combined = castt.func_name2dotted_exec( parse_expression('str (foo).strip ()')) self.assertEqual(single, 'str') # this is a very strange but possible executable name self.assertEqual(combined, 'str (foo).strip ()')
def testDottedSubscriptComplex(self): single, combined = castt.func_name2dotted_exec( parse_expression('argv[3].split[:54]')) self.assertEqual(single, 'argv') # this is a very strange but possible executable name self.assertEqual(combined, 'argv[3].split[:54]')
def testDottedCall (self): single, combined= castt.func_name2dotted_exec (parse_expression ('str (foo).strip ()')) self.assertEqual (single, 'str') # this is a very strange but possible executable name self.assertEqual (combined, 'str (foo, ).strip ()')
def testDottedSubscriptComplex (self): single, combined= castt.func_name2dotted_exec (parse_expression ('argv[3].split[:54]')) self.assertEqual (single, 'argv') # this is a very strange but possible executable name self.assertEqual (combined, 'argv[3].split[:54]')
def testDottedDottedName (self): single, combined= castt.func_name2dotted_exec (parse_expression ('test.me.py')) self.assertEqual (single, 'test') self.assertEqual (combined, 'test.me.py')
def testObjectMethod (self): single, combined= castt.func_name2dotted_exec (parse_expression ('".".join ([])')) self.assertEqual (single, None) self.assertEqual (combined, None)
def testObjectMethod(self): single, combined = castt.func_name2dotted_exec( parse_expression('".".join ([])')) self.assertEqual(single, None) self.assertEqual(combined, None)
def testDottedDottedName(self): single, combined = castt.func_name2dotted_exec( parse_expression('test.me.py')) self.assertEqual(single, 'test') self.assertEqual(combined, 'test.me.py')