コード例 #1
0
ファイル: test_castt.py プロジェクト: tdrjnr/ayrton
    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 ()')
コード例 #2
0
ファイル: test_castt.py プロジェクト: tdrjnr/ayrton
    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]')
コード例 #3
0
ファイル: test_castt.py プロジェクト: bollustrado/ayrton
    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 ()')
コード例 #4
0
ファイル: test_castt.py プロジェクト: bollustrado/ayrton
    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]')
コード例 #5
0
ファイル: test_castt.py プロジェクト: bollustrado/ayrton
    def testDottedDottedName (self):
        single, combined= castt.func_name2dotted_exec (parse_expression ('test.me.py'))

        self.assertEqual (single, 'test')
        self.assertEqual (combined, 'test.me.py')
コード例 #6
0
ファイル: test_castt.py プロジェクト: StyXman/ayrton
    def testObjectMethod (self):
        single, combined= castt.func_name2dotted_exec (parse_expression ('".".join ([])'))

        self.assertEqual (single, None)
        self.assertEqual (combined, None)
コード例 #7
0
ファイル: test_castt.py プロジェクト: tdrjnr/ayrton
    def testObjectMethod(self):
        single, combined = castt.func_name2dotted_exec(
            parse_expression('".".join ([])'))

        self.assertEqual(single, None)
        self.assertEqual(combined, None)
コード例 #8
0
ファイル: test_castt.py プロジェクト: tdrjnr/ayrton
    def testDottedDottedName(self):
        single, combined = castt.func_name2dotted_exec(
            parse_expression('test.me.py'))

        self.assertEqual(single, 'test')
        self.assertEqual(combined, 'test.me.py')