Example #1
0
File: run.py Project: thaolt/v0.83
 def __init__(self, rpchandler):
     self.rpchandler = rpchandler
     self.locals = __main__.__dict__
     self.calltip = CallTips.CallTips()
     self.autocomplete = AutoComplete.AutoComplete()
Example #2
0
 def test_good_entity(self):
     self.assertIs(ct.get_entity('int'), int)
Example #3
0
import unittest
import idlelib.CallTips as ct
CTi = ct.CallTips()  # needed for get_entity test in 2.7
import textwrap
import types
import warnings

default_tip = ''


# Test Class TC is used in multiple get_argspec test methods
class TC(object):
    'doc'
    tip = "(ai=None, *args)"

    def __init__(self, ai=None, *b):
        'doc'

    __init__.tip = "(self, ai=None, *args)"

    def t1(self):
        'doc'

    t1.tip = "(self)"

    def t2(self, ai, b=None):
        'doc'

    t2.tip = "(self, ai, b=None)"

    def t3(self, ai, *args):
Example #4
0
 def test_good_entity(self):
     self.assertIs(ct.get_entity('int'), int)
Example #5
0
 def test_bad_entity(self):
     self.assertIsNone(ct.get_entity('1/0'))
Example #6
0
 def test_bad_entity(self):
     self.assertIsNone(ct.get_entity('1/0'))
 def test_paramtuple_float(self):
     # 18539: (a,b) becomes '.0' in code object; change that but not float
     def f((a,b), c=0.0): pass
     self.assertEqual(ct.get_arg_text(f), '(<tuple>, c=0.0)')
Example #8
0
# 2017.08.29 21:57:11 Støední Evropa (letní èas)
# Embedded file name: scripts/common/Lib/idlelib/idle_test/test_calltips.py
import unittest
import idlelib.CallTips as ct

CTi = ct.CallTips()
import textwrap
import types
import warnings

default_tip = ''


class TC(object):
    """doc"""
    tip = '(ai=None, *args)'

    def __init__(self, ai=None, *b):
        """doc"""
        pass

    __init__.tip = '(self, ai=None, *args)'

    def t1(self):
        """doc"""
        pass

    t1.tip = '(self)'

    def t2(self, ai, b=None):
        """doc"""
Example #9
0
import unittest
import idlelib.CallTips as ct
CTi = ct.CallTips()


class Get_entityTest(unittest.TestCase):
    # In 3.x, get_entity changed from 'instance method' to module function
    # since 'self' not used. Use dummy instance until change 2.7 also.
    def test_bad_entity(self):
        self.assertIsNone(CTi.get_entity('1/0'))

    def test_good_entity(self):
        self.assertIs(CTi.get_entity('int'), int)


class Py2Test(unittest.TestCase):
    def test_paramtuple_float(self):
        # 18539: (a,b) becomes '.0' in code object; change that but not float
        def f((a, b), c=0.0):
            pass

        self.assertEqual(ct.get_arg_text(f), '(<tuple>, c=0.0)')


if __name__ == '__main__':
    unittest.main(verbosity=2, exit=False)
Example #10
0
 def test_paramtuple_float(self):
     # 18539: (a,b) becomes '.0' in code object; change that but not float
     def f((a,b), c=0.0): pass
     self.assertEqual(ct.get_arg_text(f), '(<tuple>, c=0.0)')