From 445f59ed23f378fe7084fb32e9778804b28539f8 Mon Sep 17 00:00:00 2001 From: Elizaveta Shashkova Date: Thu, 3 Nov 2016 20:18:27 +0300 Subject: [PATCH] Fixes after Fabio's review in pull request --- .../_pydev_bundle/pydev_console_utils.py | 4 +- .../pydev/_pydevd_bundle/pydevd_console.py | 2 +- .../pydev/_pydevd_bundle/pydevd_constants.py | 2 - .../pydevd_process_net_command.py | 6 +- .../pydev/_pydevd_bundle/pydevd_resolver.py | 11 ++ .../pydev/_pydevd_bundle/pydevd_utils.py | 70 ++++------- .../pydev/_pydevd_bundle/pydevd_vars.py | 31 ++--- .../pydev/_pydevd_bundle/pydevd_xml.py | 47 ++------ python/helpers/pydev/pydevconsole.py | 18 +-- .../tests_pydevd_python/test_debugger.py | 110 ++++++++++-------- 10 files changed, 138 insertions(+), 163 deletions(-) diff --git a/python/helpers/pydev/_pydev_bundle/pydev_console_utils.py b/python/helpers/pydev/_pydev_bundle/pydev_console_utils.py index c65ffc1fe8c1..518bc542b42e 100644 --- a/python/helpers/pydev/_pydev_bundle/pydev_console_utils.py +++ b/python/helpers/pydev/_pydev_bundle/pydev_console_utils.py @@ -6,7 +6,7 @@ from _pydev_bundle._pydev_calltip_util import get_description from _pydev_imps._pydev_saved_modules import thread from _pydevd_bundle import pydevd_vars from _pydevd_bundle import pydevd_xml -from _pydevd_bundle.pydevd_constants import IS_JYTHON +from _pydevd_bundle.pydevd_constants import IS_JYTHON, dict_iter_items from _pydevd_bundle.pydevd_utils import to_string @@ -499,7 +499,7 @@ class BaseInterpreterInterface: debugger_options = {} env_key = "PYDEVD_EXTRA_ENVS" if env_key in debugger_options: - for (env_name, value) in debugger_options[env_key].items(): + for (env_name, value) in dict_iter_items(debugger_options[env_key]): os.environ[env_name] = value del debugger_options[env_key] def do_connect_to_debugger(): diff --git a/python/helpers/pydev/_pydevd_bundle/pydevd_console.py b/python/helpers/pydev/_pydevd_bundle/pydevd_console.py index 31ad549a4ce7..e95ca2420afd 100644 --- a/python/helpers/pydev/_pydevd_bundle/pydevd_console.py +++ b/python/helpers/pydev/_pydevd_bundle/pydevd_console.py @@ -80,7 +80,7 @@ class DebugConsole(InteractiveConsole, BaseInterpreterInterface): """ overrides(BaseInterpreterInterface.create_std_in) - def create_std_in(self): + def create_std_in(self, *args, **kwargs): try: if not self.__buffer_output: return sys.stdin diff --git a/python/helpers/pydev/_pydevd_bundle/pydevd_constants.py b/python/helpers/pydev/_pydevd_bundle/pydevd_constants.py index 2efae0b8e7ed..e48d28889039 100644 --- a/python/helpers/pydev/_pydevd_bundle/pydevd_constants.py +++ b/python/helpers/pydev/_pydevd_bundle/pydevd_constants.py @@ -52,7 +52,6 @@ if IS_JYTHON: IS_JYTH_LESS25 = True CYTHON_SUPPORTED = False -GC_SUPPORTED = False try: import platform @@ -61,7 +60,6 @@ except: pass else: if python_implementation == 'CPython': - GC_SUPPORTED = True # Only available for CPython! if ( (sys.version_info[0] == 2 and sys.version_info[1] >= 7) diff --git a/python/helpers/pydev/_pydevd_bundle/pydevd_process_net_command.py b/python/helpers/pydev/_pydevd_bundle/pydevd_process_net_command.py index dec84ed73369..dec3dc6c37a2 100644 --- a/python/helpers/pydev/_pydevd_bundle/pydevd_process_net_command.py +++ b/python/helpers/pydev/_pydevd_bundle/pydevd_process_net_command.py @@ -377,7 +377,11 @@ def process_net_command(py_db, cmd_id, seq, text): elif cmd_id == CMD_EVALUATE_EXPRESSION or cmd_id == CMD_EXEC_EXPRESSION: #command to evaluate the given expression #text is: thread\tstackframe\tLOCAL\texpression - thread_id, frame_id, scope, expression, trim, temp_name = text.split('\t', 5) + temp_name = "" + try: + thread_id, frame_id, scope, expression, trim, temp_name = text.split('\t', 5) + except ValueError: + thread_id, frame_id, scope, expression, trim = text.split('\t', 4) int_cmd = InternalEvaluateExpression(seq, thread_id, frame_id, expression, cmd_id == CMD_EXEC_EXPRESSION, int(trim) == 1, temp_name) py_db.post_internal_command(int_cmd, thread_id) diff --git a/python/helpers/pydev/_pydevd_bundle/pydevd_resolver.py b/python/helpers/pydev/_pydevd_bundle/pydevd_resolver.py index 23f9d444d196..2f55a22801b3 100644 --- a/python/helpers/pydev/_pydevd_bundle/pydevd_resolver.py +++ b/python/helpers/pydev/_pydevd_bundle/pydevd_resolver.py @@ -96,6 +96,7 @@ class DefaultResolver: ''' DefaultResolver is the class that'll actually resolve how to show some variable. ''' + use_value_repr_instead_of_str = False def resolve(self, var, attribute): return getattr(var, attribute) @@ -219,6 +220,7 @@ class DefaultResolver: # DictResolver #======================================================================================================================= class DictResolver: + use_value_repr_instead_of_str = False def resolve(self, dict, key): if key in ('__len__', TOO_LARGE_ATTR): @@ -274,6 +276,7 @@ class DictResolver: # TupleResolver #======================================================================================================================= class TupleResolver: #to enumerate tuples and lists + use_value_repr_instead_of_str = False def resolve(self, var, attribute): ''' @@ -317,6 +320,7 @@ class SetResolver: ''' Resolves a set as dict id(object)->object ''' + use_value_repr_instead_of_str = False def resolve(self, var, attribute): if attribute in ('__len__', TOO_LARGE_ATTR): @@ -356,6 +360,7 @@ class SetResolver: # InstanceResolver #======================================================================================================================= class InstanceResolver: + use_value_repr_instead_of_str = False def resolve(self, var, attribute): field = var.__class__.getDeclaredField(attribute) @@ -384,6 +389,7 @@ class JyArrayResolver: ''' This resolves a regular Object[] array from java ''' + use_value_repr_instead_of_str = False def resolve(self, var, attribute): if attribute == '__len__': @@ -407,6 +413,7 @@ class NdArrayResolver: ''' This resolves a numpy ndarray returning some metadata about the NDArray ''' + use_value_repr_instead_of_str = False def is_numeric(self, obj): if not hasattr(obj, 'dtype'): @@ -472,6 +479,7 @@ class NdArrayItemsContainer: pass # MultiValueDictResolver #======================================================================================================================= class MultiValueDictResolver(DictResolver): + use_value_repr_instead_of_str = False def resolve(self, dict, key): if key in ('__len__', TOO_LARGE_ATTR): @@ -494,6 +502,7 @@ class MultiValueDictResolver(DictResolver): #======================================================================================================================= class DjangoFormResolver(DefaultResolver): has_errors_attr = False + use_value_repr_instead_of_str = True def get_names(self, var): names = dir(var) @@ -521,6 +530,7 @@ class DjangoFormResolver(DefaultResolver): # DequeResolver #======================================================================================================================= class DequeResolver(TupleResolver): + use_value_repr_instead_of_str = False def get_dictionary(self, var): d = TupleResolver.get_dictionary(self, var) d['maxlen'] = getattr(var, 'maxlen', None) @@ -534,6 +544,7 @@ class FrameResolver: ''' This resolves a frame. ''' + use_value_repr_instead_of_str = False def resolve(self, obj, attribute): if attribute == '__internals__': diff --git a/python/helpers/pydev/_pydevd_bundle/pydevd_utils.py b/python/helpers/pydev/_pydevd_bundle/pydevd_utils.py index bb5067a882bf..a5a2958d4a27 100644 --- a/python/helpers/pydev/_pydevd_bundle/pydevd_utils.py +++ b/python/helpers/pydev/_pydevd_bundle/pydevd_utils.py @@ -8,13 +8,10 @@ except: from urllib.parse import quote # @UnresolvedImport import inspect -from _pydevd_bundle.pydevd_constants import IS_PY3K, GC_SUPPORTED +from _pydevd_bundle.pydevd_constants import IS_PY3K import sys from _pydev_bundle import pydev_log -try: - import gc -except ImportError: - GC_SUPPORTED = False + def save_main_module(file, module_name): # patch provided by: Scott Schlesier - when script is run, it does not @@ -127,51 +124,26 @@ else: def get_clsname_for_code(code, frame): clsname = None - if GC_SUPPORTED: - ## use of gc.get_referrers() was suggested by Michael Hudson - # all functions which refer to this code object - funcs = [f for f in gc.get_referrers(code) - if inspect.isfunction(f)] - # require len(func) == 1 to avoid ambiguity caused by calls to - # new.function(): "In the face of ambiguity, refuse the - # temptation to guess." - if len(funcs) == 1: - dicts = [d for d in gc.get_referrers(funcs[0]) - if isinstance(d, dict)] - if len(dicts) == 1: - classes = [c for c in gc.get_referrers(dicts[0]) - if hasattr(c, "__bases__") or inspect.isclass(c)] - elif len(dicts) > 1: #new-style classes - classes = [c for c in gc.get_referrers(dicts[1]) - if hasattr(c, "__bases__") or inspect.isclass(c)] - else: - classes = [] - - if len(classes) == 1: - # ditto for new.classobj() - clsname = classes[0].__name__ - - if clsname is None: - # If gc is not supported we are checking the first argument of the function + if len(code.co_varnames) > 0: + # We are checking the first argument of the function # (`self` or `cls` for methods). - func_name = code.co_name - if len(code.co_varnames) > 0: - first_arg_name = code.co_varnames[0] - if first_arg_name in frame.f_locals: - first_arg_obj = frame.f_locals[first_arg_name] - if inspect.isclass(first_arg_obj): # class method - first_arg_class = first_arg_obj - else: # instance method - first_arg_class = first_arg_obj.__class__ - if hasattr(first_arg_class, func_name): - method = getattr(first_arg_class, func_name) - func_code = None - if hasattr(method, 'func_code'): # Python2 - func_code = method.func_code - elif hasattr(method, '__code__'): # Python3 - func_code = method.__code__ - if func_code and func_code == code: - clsname = first_arg_class.__name__ + first_arg_name = code.co_varnames[0] + if first_arg_name in frame.f_locals: + first_arg_obj = frame.f_locals[first_arg_name] + if inspect.isclass(first_arg_obj): # class method + first_arg_class = first_arg_obj + else: # instance method + first_arg_class = first_arg_obj.__class__ + func_name = code.co_name + if hasattr(first_arg_class, func_name): + method = getattr(first_arg_class, func_name) + func_code = None + if hasattr(method, 'func_code'): # Python2 + func_code = method.func_code + elif hasattr(method, '__code__'): # Python3 + func_code = method.__code__ + if func_code and func_code == code: + clsname = first_arg_class.__name__ return clsname diff --git a/python/helpers/pydev/_pydevd_bundle/pydevd_vars.py b/python/helpers/pydev/_pydevd_bundle/pydevd_vars.py index 7db36f504fd0..e04eb5f22942 100644 --- a/python/helpers/pydev/_pydevd_bundle/pydevd_vars.py +++ b/python/helpers/pydev/_pydevd_bundle/pydevd_vars.py @@ -2,7 +2,7 @@ resolution/conversion to XML. """ import pickle -from _pydevd_bundle.pydevd_constants import dict_contains, get_frame, get_thread_id +from _pydevd_bundle.pydevd_constants import dict_contains, get_frame, get_thread_id, xrange from _pydevd_bundle.pydevd_custom_frames import get_custom_frame from _pydevd_bundle.pydevd_xml import ExceptionOnEvaluate, get_type, var_to_xml @@ -20,6 +20,7 @@ from _pydevd_bundle import pydevd_save_locals from _pydev_bundle.pydev_imports import Exec, quote, execfile from _pydevd_bundle.pydevd_utils import to_string +SENTINEL_VALUE = [] # -------------------------------------------------------------------------- defining true and false for earlier versions @@ -368,7 +369,7 @@ def evaluate_expression(thread_id, frame_id, expression, doExec): del frame -def change_attr_expression(thread_id, frame_id, attr, expression, dbg, value=None): +def change_attr_expression(thread_id, frame_id, attr, expression, dbg, value=SENTINEL_VALUE): '''Changes some attribute in a given frame. ''' frame = find_frame(thread_id, frame_id) @@ -378,7 +379,7 @@ def change_attr_expression(thread_id, frame_id, attr, expression, dbg, value=Non try: expression = expression.replace('@LINE@', '\n') - if dbg.plugin and not value: + if dbg.plugin and value is not SENTINEL_VALUE: result = dbg.plugin.change_variable(frame, attr, expression) if result: return result @@ -386,20 +387,20 @@ def change_attr_expression(thread_id, frame_id, attr, expression, dbg, value=Non if attr[:7] == "Globals": attr = attr[8:] if attr in frame.f_globals: - if value is None: + if value is SENTINEL_VALUE: value = eval(expression, frame.f_globals, frame.f_locals) frame.f_globals[attr] = value return frame.f_globals[attr] else: if pydevd_save_locals.is_save_locals_available(): - if value is None: + if value is SENTINEL_VALUE: value = eval(expression, frame.f_globals, frame.f_locals) frame.f_locals[attr] = value pydevd_save_locals.save_locals(frame) return frame.f_locals[attr] # default way (only works for changing it in the topmost frame) - if value is None: + if value is SENTINEL_VALUE: value = eval(expression, frame.f_globals, frame.f_locals) result = value Exec('%s=%s' % (attr, expression), frame.f_globals, frame.f_locals) @@ -539,6 +540,15 @@ def array_to_meta_xml(array, name, format): return array, xml, rows, cols, format +def array_default_format(type): + if type == 'f': + return '.5f' + elif type == 'i' or type == 'u': + return 'd' + else: + return 's' + + def dataframe_to_xml(df, name, roffset, coffset, rows, cols, format): """ :type df: pandas.core.frame.DataFrame @@ -581,13 +591,6 @@ def dataframe_to_xml(df, name, roffset, coffset, rows, cols, format): df = df.iloc[roffset: roffset + rows, coffset: coffset + cols] rows, cols = df.shape - def default_format(type): - if type == 'f': - return '.5f' - elif type == 'i' or type == 'u': - return 'd' - else: - return 's' xml += "\n" % (rows, cols) format = format.replace('%', '') @@ -597,7 +600,7 @@ def dataframe_to_xml(df, name, roffset, coffset, rows, cols, format): for col in range(cols): dtype = df.dtypes.iloc[col].kind - fmt = format if (dtype == 'f' and format) else default_format(dtype) + fmt = format if (dtype == 'f' and format) else array_default_format(dtype) col_formats.append('%' + fmt) bounds = col_bounds[col] diff --git a/python/helpers/pydev/_pydevd_bundle/pydevd_xml.py b/python/helpers/pydev/_pydevd_bundle/pydevd_xml.py index 35c6c242288c..541dea6aa23f 100644 --- a/python/helpers/pydev/_pydevd_bundle/pydevd_xml.py +++ b/python/helpers/pydev/_pydevd_bundle/pydevd_xml.py @@ -2,7 +2,8 @@ from _pydev_bundle import pydev_log import traceback from _pydevd_bundle import pydevd_resolver import sys -from _pydevd_bundle.pydevd_constants import dict_keys, IS_PY3K, MAXIMUM_VARIABLE_REPRESENTATION_SIZE, RETURN_VALUES_DICT +from _pydevd_bundle.pydevd_constants import dict_contains, dict_iter_items, dict_keys, IS_PY3K, \ + MAXIMUM_VARIABLE_REPRESENTATION_SIZE, RETURN_VALUES_DICT from _pydev_bundle.pydev_imports import quote @@ -156,18 +157,8 @@ def get_type(o): def return_values_from_dict_to_xml(return_dict): res = "" - for name in dict_keys(return_dict): - val = return_dict[name] - res += var_to_xml(val, name, return_value=True) - return res - - -def ipython_hidden_values_to_xml(key, val, hidden_ns): - res = "" - if key in hidden_ns.keys(): - res += var_to_xml(val, str(key), ipython_hidden=True) - else: - res += var_to_xml(val, str(key)) + for name, val in dict_iter_items(return_dict): + res += var_to_xml(val, name, additionalInXml=' isRetVal="True"') return res @@ -189,8 +180,8 @@ def frame_vars_to_xml(frame_f_locals, hidden_ns=None): if k == RETURN_VALUES_DICT: xml += return_values_from_dict_to_xml(v) else: - if hidden_ns is not None: - xml += ipython_hidden_values_to_xml(k, v, hidden_ns) + if hidden_ns is not None and dict_contains(hidden_ns, k): + xml += var_to_xml(v, str(k), additionalInXml=' isIPythonHidden="True"') else: xml += var_to_xml(v, str(k)) except Exception: @@ -200,9 +191,6 @@ def frame_vars_to_xml(frame_f_locals, hidden_ns=None): return xml -def get_type_qualifier(type): - return getattr(type, "__module__", "") - def var_to_xml(val, name, doTrim=True, additionalInXml='', return_value=False, ipython_hidden=False): """ single variable or dictionary to xml representation """ @@ -214,13 +202,8 @@ def var_to_xml(val, name, doTrim=True, additionalInXml='', return_value=False, i v = val _type, typeName, resolver = get_type(v) - type_qualifier = get_type_qualifier(_type) - - - do_not_call_value_str = False - if isinstance(resolver, pydevd_resolver.djangoFormResolver.__class__): - # do not call str() of Django form objects because has side effects and breaks self.errors - do_not_call_value_str = True + type_qualifier = getattr(_type, "__module__", "") + do_not_call_value_str = resolver is not None and resolver.use_value_repr_instead_of_str try: if hasattr(v, '__class__'): @@ -263,20 +246,10 @@ def var_to_xml(val, name, doTrim=True, additionalInXml='', return_value=False, i except: pass - if return_value: - xmlRetVal = ' isRetVal="True"' - else: - xmlRetVal = '' - - if ipython_hidden: - xmlIPythonHidden = ' isIPythonHidden="True"' - else: - xmlIPythonHidden = '' - xml = '\n')) + return ''.join((xml, xmlQualifier, xmlValue, xmlCont, additionalInXml, ' />\n')) diff --git a/python/helpers/pydev/pydevconsole.py b/python/helpers/pydev/pydevconsole.py index 160cfc141153..ff85bb212187 100644 --- a/python/helpers/pydev/pydevconsole.py +++ b/python/helpers/pydev/pydevconsole.py @@ -16,6 +16,7 @@ import os import sys from _pydev_imps._pydev_saved_modules import threading +from _pydevd_bundle.pydevd_constants import dict_iter_items import traceback from _pydev_bundle import fix_getpass @@ -338,7 +339,7 @@ def start_console_server(host, port, interpreter): pass if not retry: raise - # Otherwise, keep on going + # Otherwise, keep on going return server @@ -361,12 +362,15 @@ def get_ipython_hidden_vars_dict(): if IPYTHON and hasattr(__builtin__, 'interpreter'): pydev_interpreter = get_interpreter().interpreter if hasattr(pydev_interpreter, 'ipython') and hasattr(pydev_interpreter.ipython, 'user_ns_hidden'): - try: - user_hidden_dict = pydev_interpreter.ipython.user_ns_hidden - except: - user_hidden_dict = dict([(key, val) for key, val in pydev_interpreter.ipython.user_ns.items() - if key in pydev_interpreter.ipython.user_ns_hidden]) - return dict([(key, val) for key, val in user_hidden_dict.items() if key not in useful_ipython_vars]) + user_ns_hidden = pydev_interpreter.ipython.user_ns_hidden + if isinstance(user_ns_hidden, dict): + # Since IPython 2 dict `user_ns_hidden` contains hidden variables and values + user_hidden_dict = user_ns_hidden + else: + # In IPython 1.x `user_ns_hidden` used to be a set with names of hidden variables + user_hidden_dict = dict([(key, val) for key, val in dict_iter_items(pydev_interpreter.ipython.user_ns) + if key in user_ns_hidden]) + return dict([(key, val) for key, val in dict_iter_items(user_hidden_dict) if key not in useful_ipython_vars]) return None except Exception: traceback.print_exc() diff --git a/python/helpers/pydev/tests_pydevd_python/test_debugger.py b/python/helpers/pydev/tests_pydevd_python/test_debugger.py index f9725f843d81..77e4ccbedbcd 100644 --- a/python/helpers/pydev/tests_pydevd_python/test_debugger.py +++ b/python/helpers/pydev/tests_pydevd_python/test_debugger.py @@ -5,7 +5,7 @@ Note that it's a python script but it'll spawn a process to run as jython, ironpython and as python. ''' -from tests_pydevd_python.debugger_unittest import get_free_port +from tests_python.debugger_unittest import get_free_port import threading @@ -22,7 +22,7 @@ import unittest import os import sys import time -from tests_pydevd_python import debugger_unittest +from tests_python import debugger_unittest TEST_DJANGO = False if sys.version_info[:2] == (2, 7): @@ -33,6 +33,16 @@ if sys.version_info[:2] == (2, 7): except: pass +IS_PY2 = False +if sys.version_info[0] == 2: + IS_PY2 = True + +if IS_PY2: + builtin_qualifier = "__builtin__" +else: + builtin_qualifier = "builtins" + + TEST_CYTHON = os.getenv('PYDEVD_USE_CYTHON', None) == 'YES' #======================================================================================================================= @@ -52,7 +62,7 @@ class WriterThreadCaseSetNextStatement(debugger_unittest.AbstractWriterThread): assert line == 6, 'Expected return to be in line 6, was: %s' % line self.write_evaluate_expression('%s\t%s\t%s' % (thread_id, frame_id, 'LOCAL'), 'a') - self.wait_for_evaluation('') - self.wait_for_vars('') - self.wait_for_vars('') + self.wait_for_vars('') + self.wait_for_vars('') + self.wait_for_vars('') # For each variable, check each of the resolved (meta data) attributes... self.write_get_variable(thread_id, frame_id, 'smallarray') @@ -275,14 +285,14 @@ class WriterThreadCase16(debugger_unittest.AbstractWriterThread): self.write_get_variable(thread_id, frame_id, 'bigarray') self.wait_for_var([ - '', - '', - '', + '', + '', + ''.format(builtin_qualifier), ]) self.wait_for_var([ - '', - '', - '', + '', + '', - '', + ''.format(builtin_qualifier), + ''.format(builtin_qualifier), ]) self.wait_for_var([ - '', - '', + ''.format(builtin_qualifier), + ''.format(builtin_qualifier), ]) self.wait_for_var('False', '0' ] - ) + ) assert 17 == self._sequence, 'Expected 19. Had: %s' % self._sequence self.write_run_thread(thread_id) @@ -623,13 +633,13 @@ class WriterThreadCase7(debugger_unittest.AbstractWriterThread): self.write_get_frame(thread_id, frame_id) - self.wait_for_vars('%0A') + self.wait_for_vars('%0A'.format(builtin_qualifier)) self.write_step_over(thread_id) self.write_get_frame(thread_id, frame_id) - self.wait_for_vars('%0A%0A') + self.wait_for_vars('%0A%0A'.format(builtin_qualifier)) self.write_run_thread(thread_id) @@ -1018,11 +1028,11 @@ class TestPython(unittest.TestCase, DebuggerBase): class TestJython(unittest.TestCase, DebuggerBase): def get_command_line(self): return [ - JAVA_LOCATION, - '-classpath', - JYTHON_JAR_LOCATION, - 'org.python.util.jython' - ] + JAVA_LOCATION, + '-classpath', + JYTHON_JAR_LOCATION, + 'org.python.util.jython' + ] # This case requires decorators to work (which are not present on Jython 2.1), so, this test is just removed from the jython run. def test_case_13(self): @@ -1041,9 +1051,9 @@ class TestJython(unittest.TestCase, DebuggerBase): class TestIronPython(unittest.TestCase, DebuggerBase): def get_command_line(self): return [ - IRONPYTHON_EXE, - '-X:Frames' - ] + IRONPYTHON_EXE, + '-X:Frames' + ] def test_case_3(self): self.skipTest("Timing issues") # This test fails once in a while due to timing issues on IronPython, so, skipping it. @@ -1140,34 +1150,34 @@ if __name__ == '__main__': # pass suite = unittest.TestSuite() -# suite.addTests(unittest.makeSuite(TestJython)) # Note: Jython should be 2.2.1 -# -# suite.addTests(unittest.makeSuite(TestIronPython)) -# + # suite.addTests(unittest.makeSuite(TestJython)) # Note: Jython should be 2.2.1 + # + # suite.addTests(unittest.makeSuite(TestIronPython)) + # suite.addTests(unittest.makeSuite(TestPython)) -# suite.addTest(TestIronPython('test_case_18')) -# suite.addTest(TestIronPython('test_case_17')) -# suite.addTest(TestIronPython('test_case_3')) -# suite.addTest(TestIronPython('test_case_7')) -# -# suite.addTest(TestPython('test_case_10')) -# suite.addTest(TestPython('test_case_django')) -# suite.addTest(TestPython('test_case_qthread1')) -# suite.addTest(TestPython('test_case_qthread2')) -# suite.addTest(TestPython('test_case_qthread3')) + # suite.addTest(TestIronPython('test_case_18')) + # suite.addTest(TestIronPython('test_case_17')) + # suite.addTest(TestIronPython('test_case_3')) + # suite.addTest(TestIronPython('test_case_7')) + # + # suite.addTest(TestPython('test_case_10')) + # suite.addTest(TestPython('test_case_django')) + # suite.addTest(TestPython('test_case_qthread1')) + # suite.addTest(TestPython('test_case_qthread2')) + # suite.addTest(TestPython('test_case_qthread3')) -# suite.addTest(TestPython('test_case_17a')) + # suite.addTest(TestPython('test_case_17a')) -# suite.addTest(TestJython('test_case_1')) -# suite.addTest(TestPython('test_case_2')) -# unittest.TextTestRunner(verbosity=3).run(suite) - # suite.addTest(TestPython('test_case_17')) - # suite.addTest(TestPython('test_case_18')) - # suite.addTest(TestPython('test_case_19')) + # suite.addTest(TestJython('test_case_1')) + # suite.addTest(TestPython('test_case_2')) + # unittest.TextTestRunner(verbosity=3).run(suite) + # suite.addTest(TestPython('test_case_17')) + # suite.addTest(TestPython('test_case_18')) + # suite.addTest(TestPython('test_case_19')) unittest.TextTestRunner(verbosity=3).run(suite)